Skip to content

Commit

Permalink
Update eslint config
Browse files Browse the repository at this point in the history
  • Loading branch information
sefinek committed Mar 2, 2024
1 parent ae9a124 commit a44d275
Showing 1 changed file with 15 additions and 23 deletions.
38 changes: 15 additions & 23 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,19 +1,15 @@
module.exports = {
'extends': [
'eslint:recommended',
],
'env': {
'es6': true,
'node': true,
'es2023': true,
'browser': true,
},
'extends': ['eslint:recommended'],
'parserOptions': {
'ecmaVersion': 2023,
'ecmaVersion': 'latest',
},
'ignorePatterns': [],
'rules': {
'arrow-spacing': ['warn', { 'before': true, 'after': true }],
// 'brace-style': ['warn', 'stroustrup', { 'allowSingleLine': true }],
'arrow-spacing': ['warn', { before: true, after: true }],
'comma-dangle': ['error', 'always-multiline'],
'comma-spacing': 'error',
'comma-style': 'error',
Expand All @@ -22,37 +18,33 @@ module.exports = {
'handle-callback-err': 'off',
'indent': ['warn', 'tab'],
'keyword-spacing': 'warn',
'max-nested-callbacks': ['error', { 'max': 4 }],
'max-statements-per-line': ['error', { 'max': 2 }],
'max-nested-callbacks': ['error', { max: 4 }],
'max-statements-per-line': ['error', { max: 2 }],
'no-console': 'off',
'no-empty': 'warn',
'no-empty-function': 'error',
'no-floating-decimal': 'error',
// 'no-inline-comments': 'error',
'no-lonely-if': 'error',
'no-multi-spaces': 'warn',
'no-multiple-empty-lines': ['warn', { 'max': 4, 'maxEOF': 1, 'maxBOF': 0 }],
'no-shadow': ['error', { 'allow': ['err', 'resolve', 'reject'] }],
'no-multiple-empty-lines': ['warn', { max: 4, maxEOF: 1, maxBOF: 0 }],
'no-shadow': ['error', { allow: ['err', 'resolve', 'reject'] }],
'no-trailing-spaces': ['warn'],
'no-unreachable': 'warn',
'no-unused-vars': 'warn',
'no-use-before-define': ['error', { functions: false, classes: true }],
'no-var': 'error',
'object-curly-spacing': ['error', 'always'],
'prefer-const': 'error',
'quotes': ['warn', 'single'],
'semi': ['warn', 'always'],
'sort-vars': 'warn',
'space-before-blocks': 'error',
'space-before-function-paren': ['error', {
'anonymous': 'never',
'named': 'never',
'asyncArrow': 'always',
}],
'space-before-function-paren': ['error', { anonymous: 'never', named: 'never', asyncArrow: 'always' }],
'space-in-parens': 'error',
'space-infix-ops': 'error',
'space-unary-ops': 'error',
'spaced-comment': 'warn',
'yoda': 'error',
'no-use-before-define': ['error', { 'functions': false, 'classes': true }],
'no-unused-vars': 'warn',
'wrap-regex': 'error',
'sort-vars': 'warn',
'no-unreachable': 'warn',
'yoda': 'error',
},
};

0 comments on commit a44d275

Please sign in to comment.