eslint-config-luxjs
Version:
Luxbet Eslint shareable config
120 lines (119 loc) • 3.06 kB
JavaScript
module.exports = {
rules: {
// Stylistic Issues
'array-bracket-spacing': ['error', 'never'],
'block-spacing': ['error', 'always'],
'brace-style': ['error', '1tbs', {
allowSingleLine: false,
}],
'camelcase': ['error', {
properties: 'never',
}],
'comma-spacing': ['error', {
before: false,
after: true,
}],
'comma-style': ['error', 'last'],
'computed-property-spacing': ['error', 'never'],
'consistent-this': ['warn', 'self'],
'eol-last': ['warn'],
'func-names': ['off'],
'func-style': ['error', 'declaration', {
allowArrowFunctions: true,
}],
'id-blacklist': ['off'],
'id-length': ['off'],
'id-match': ['off'],
'indent': ['error', 'tab', {
SwitchCase: 1,
}],
'jsx-quotes': ['off'],
'key-spacing': ['error', {
singleLine: {
beforeColon: false,
afterColon: true,
mode: 'minimum',
},
multiLine: {
beforeColon: false,
afterColon: true,
mode: 'strict',
},
}],
'keyword-spacing': ['error', {
before: true,
after: true,
}],
'linebreak-style': ['off'],
'lines-around-comment': ['off'],
'max-depth': ['error', {
max: 4,
}],
'max-len': ['off'],
'max-nested-callbacks': ['off'],
'max-params': ['off'],
'max-statements': ['off'],
'max-statements-per-line': ['error', {
max: 1,
}],
'new-cap': ['error', {
newIsCap: true,
capIsNew: false,
}],
'new-parens': ['error'],
'newline-after-var': ['off'],
'newline-before-return': ['off'],
'newline-per-chained-call': ['off'],
'no-array-constructor': ['off'],
'no-bitwise': ['off'],
'no-continue': ['off'],
'no-inline-comments': ['off'],
'no-lonely-if': ['error'],
'no-mixed-spaces-and-tabs': ['off'],
'no-multiple-empty-lines': ['error'],
'no-negated-condition': ['error'],
'no-nested-ternary': ['error'],
'no-new-object': ['off'],
'no-plusplus': ['off'],
'no-restricted-syntax': ['off'],
'no-spaced-func': ['error'],
'no-ternary': ['off'],
'no-trailing-spaces': ['error'],
'no-underscore-dangle': ['off'],
'no-unneeded-ternary': ['error'],
'no-whitespace-before-property': ['off'],
'object-curly-spacing': ['error', 'always'],
'object-property-newline': ['off'],
'one-var': ['error', {
uninitialized: 'always',
initialized: 'never',
}],
'one-var-declaration-per-line': ['error', 'initializations'],
'operator-assignment': ['off'],
'operator-linebreak': ['off'],
'padded-blocks': ['off'],
'quote-props': ['error', 'consistent-as-needed'],
'quotes': ['error', 'single', {
avoidEscape: false,
allowTemplateLiterals: false,
}],
'require-jsdoc': ['off'],
'semi': ['error', 'always'],
'semi-spacing': ['error', {
before: false,
after: true,
}],
'sort-vars': ['off'],
'space-before-blocks': ['error'],
'space-before-function-paren': ['error', 'always'],
'space-in-parens': ['error', 'never'],
'space-infix-ops': ['error'],
'space-unary-ops': ['error', {
words: true,
nonwords: false,
}],
'spaced-comment': ['off'],
'unicode-bom': ['off'],
'wrap-regex': ['off'],
},
};