eslint-config-dcard
Version:
ESLint config for Dcard projects
320 lines (258 loc) • 10.3 kB
JavaScript
module.exports = {
rules: {
// Prettier
// enforce linebreaks after opening and before closing array brackets
// https://eslint.org/docs/rules/array-bracket-newline
'array-bracket-newline': 'off',
// Prettier
// enforce consistent spacing inside array brackets
// https://eslint.org/docs/rules/array-bracket-spacing
'array-bracket-spacing': 'off',
// Prettier
// enforce line breaks after each array element
// https://eslint.org/docs/rules/array-element-newline
'array-element-newline': 'off',
// Prettier
// require parentheses around arrow function arguments
// https://eslint.org/docs/rules/arrow-parens
'arrow-parens': 'off',
// Prettier
// enforce consistent spacing before and after the arrow in arrow functions
// https://eslint.org/docs/rules/arrow-spacing
'arrow-spacing': 'off',
// Prettier
// disallow or enforce spaces inside of blocks after opening block and before closing block
// https://eslint.org/docs/rules/block-spacing
'block-spacing': 'off',
// Prettier
// enforce consistent brace style for blocks
// https://eslint.org/docs/rules/brace-style
'brace-style': 'off',
// Prettier
// require trailing commas in multiline object literals
// https://eslint.org/docs/rules/comma-dangle
'comma-dangle': 'off',
// Prettier
// enforce spacing before and after comma
// https://eslint.org/docs/rules/comma-spacing
'comma-spacing': 'off',
// Prettier
// enforce one true comma style
// https://eslint.org/docs/rules/comma-style
'comma-style': 'off',
// Prettier
// enforce consistent spacing inside computed property brackets
// https://eslint.org/docs/rules/computed-property-spacing
'computed-property-spacing': 'off',
// Prettier
// enforce consistent newlines before and after dots
// https://eslint.org/docs/rules/dot-location
'dot-location': 'off',
// Prettier
// require or disallow newline at the end of files
// https://eslint.org/docs/rules/eol-last
'eol-last': 'off',
// Prettier
// require or disallow spacing between function identifiers and their invocations
// https://eslint.org/docs/rules/func-call-spacing
'func-call-spacing': 'off',
// Prettier
// enforce line breaks between arguments of a function call
// https://eslint.org/docs/rules/function-call-argument-newline
'function-call-argument-newline': 'off',
// Prettier
// enforce consistent line breaks inside function parentheses
// https://eslint.org/docs/rules/function-paren-newline
'function-paren-newline': 'off',
// Prettier
// enforce consistent spacing around `*` operators in generator functions
// https://eslint.org/docs/rules/generator-star-spacing
'generator-star-spacing': 'off',
// Prettier
// enforce the location of arrow function bodies
// https://eslint.org/docs/rules/implicit-arrow-linebreak
'implicit-arrow-linebreak': 'off',
// Prettier
// enforce consistent indentation
// https://eslint.org/docs/rules/indent
indent: 'off',
// Prettier
// enforce the consistent use of either double or single quotes in JSX attributes
// https://eslint.org/docs/rules/jsx-quotes
'jsx-quotes': 'off',
// Prettier
// enforce consistent spacing between keys and values in object literal properties
// https://eslint.org/docs/rules/key-spacing
'key-spacing': 'off',
// Prettier
// enforce consistent spacing before and after keywords
// https://eslint.org/docs/rules/keyword-spacing
'keyword-spacing': 'off',
// enforce position of line comments
// https://eslint.org/docs/rules/line-comment-position
// TODO: enable?
'line-comment-position': [
'off',
{
position: 'above',
ignorePattern: '',
applyDefaultPatterns: true,
},
],
// Prettier
// enforce consistent linebreak style
// https://eslint.org/docs/rules/linebreak-style
'linebreak-style': 'off',
// Prettier
// require empty lines around comments
// https://eslint.org/docs/rules/lines-around-comment
'lines-around-comment': 'off',
// require or disallow an empty line between class members
// https://eslint.org/docs/rules/lines-between-class-members
// typescript-eslint
'lines-between-class-members': 'off',
// Prettier
// enforce a maximum line length
// https://eslint.org/docs/rules/max-len
'max-len': 'off',
// enforce a maximum number of statements allowed per line
// https://eslint.org/docs/rules/max-statements-per-line
'max-statements-per-line': ['off', { max: 1 }],
// Prettier
// enforce newlines between operands of ternary expressions
// https://eslint.org/docs/rules/multiline-ternary
'multiline-ternary': 'off',
// Prettier
// enforce or disallow parentheses when invoking a constructor with no arguments
// https://eslint.org/docs/rules/new-parens
'new-parens': 'off',
// Prettier
// require a newline after each call in a method chain
// https://eslint.org/docs/rules/newline-per-chained-call
'newline-per-chained-call': 'off',
// Prettier
// disallow unnecessary parentheses
// https://eslint.org/docs/rules/no-extra-parens
'no-extra-parens': 'off',
// Prettier
// disallow mixed spaces and tabs for indentation
// https://eslint.org/docs/rules/no-mixed-spaces-and-tabs
'no-mixed-spaces-and-tabs': 'off',
// Prettier
// disallow multiple spaces
// https://eslint.org/docs/rules/no-multi-spaces
'no-multi-spaces': 'off',
// Prettier
// disallow multiple empty lines
// https://eslint.org/docs/rules/no-multiple-empty-lines
'no-multiple-empty-lines': 'off',
// Prettier
// disallow all tabs
// https://eslint.org/docs/rules/no-tabs
'no-tabs': 'off',
// Prettier
// disallow trailing whitespace at the end of lines
// https://eslint.org/docs/rules/no-trailing-spaces
'no-trailing-spaces': 'off',
// Prettier
// disallow whitespace before properties
// https://eslint.org/docs/rules/no-whitespace-before-property
'no-whitespace-before-property': 'off',
// Prettier
// enforce the location of single-line statements
// https://eslint.org/docs/rules/nonblock-statement-body-position
'nonblock-statement-body-position': 'off',
// Prettier
// enforce consistent line breaks after opening and before closing braces
// https://eslint.org/docs/rules/object-curly-newline
'object-curly-newline': 'off',
// Prettier
// enforce consistent spacing inside braces
// https://eslint.org/docs/rules/object-curly-spacing
'object-curly-spacing': 'off',
// Prettier
// enforce placing object properties on separate lines
// https://eslint.org/docs/rules/object-property-newline
'object-property-newline': 'off',
// Prettier
// enforce consistent linebreak style for operators
// https://eslint.org/docs/rules/operator-linebreak
'operator-linebreak': 'off',
// Prettier
// require or disallow padding within blocks
// https://eslint.org/docs/rules/padded-blocks
'padded-blocks': 'off',
// require or disallow padding lines between statements
// https://eslint.org/docs/rules/padding-line-between-statements
// typescript-eslint
'padding-line-between-statements': 'off',
// Prettier
// enforce the consistent use of either backticks, double, or single quotes
// https://eslint.org/docs/rules/quotes
quotes: 'off',
// Prettier
// enforce spacing between rest and spread operators and their expressions
// https://eslint.org/docs/rules/rest-spread-spacing
'rest-spread-spacing': 'off',
// Prettier
// require or disallow semicolons instead of ASI
// https://eslint.org/docs/rules/semi
semi: 'off',
// Prettier
// enforce consistent spacing before and after semicolons
// https://eslint.org/docs/rules/semi-spacing
'semi-spacing': 'off',
// Prettier
// enforce location of semicolons
// https://eslint.org/docs/rules/semi-style
'semi-style': 'off',
// Prettier
// enforce consistent spacing before blocks
// https://eslint.org/docs/rules/space-before-blocks
'space-before-blocks': 'off',
// Prettier
// enforce consistent spacing before `function` definition opening parenthesis
// https://eslint.org/docs/rules/space-before-function-paren
'space-before-function-paren': 'off',
// Prettier
// enforce consistent spacing inside parentheses
// https://eslint.org/docs/rules/space-in-parens
'space-in-parens': 'off',
// Prettier
// require spacing around infix operators
// https://eslint.org/docs/rules/space-infix-ops
'space-infix-ops': 'off',
// Prettier
// enforce consistent spacing before or after unary operators
// https://eslint.org/docs/rules/space-unary-ops
'space-unary-ops': 'off',
// Prettier
// enforce spacing around colons of switch statements
// https://eslint.org/docs/rules/switch-colon-spacing
'switch-colon-spacing': 'off',
// Prettier
// require or disallow spacing around embedded expressions of template strings
// https://eslint.org/docs/rules/template-curly-spacing
'template-curly-spacing': 'off',
// Prettier
// require or disallow spacing between template tags and their literals
// https://eslint.org/docs/rules/template-tag-spacing
'template-tag-spacing': 'off',
// Prettier
// require or disallow Unicode byte order mark (BOM)
// https://eslint.org/docs/rules/unicode-bom
'unicode-bom': 'off',
// Prettier
// require immediate function invocation to be wrapped in parentheses
// https://eslint.org/docs/rules/wrap-iife.html
'wrap-iife': 'off',
// Prettier
// require parenthesis around regex literals
// https://eslint.org/docs/rules/wrap-regex
'wrap-regex': 'off',
// Prettier
// require or disallow spacing around the `*` in `yield*` expressions
// https://eslint.org/docs/rules/yield-star-spacing
'yield-star-spacing': 'off',
},
};