Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: update ESLint rules to flat config #1557

Merged
merged 7 commits into from
Jan 8, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
style: ESLint
  • Loading branch information
Jiralite committed Jan 8, 2025
commit e1bf720fcedf2e50a75c5ef7f12cad8de419f178
30 changes: 15 additions & 15 deletions guide/preparations/setting-up-a-linter.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ module.exports = [
ecmaVersion: 'latest',
},
rules: {

},
},
];
Expand All @@ -85,44 +85,44 @@ module.exports = [
ecmaVersion: 'latest',
},
rules: {
'arrow-spacing': ['warn', { 'before': true, 'after': true }],
'brace-style': ['error', 'stroustrup', { 'allowSingleLine': true }],
'arrow-spacing': ['warn', { before: true, after: true }],
'brace-style': ['error', 'stroustrup', { allowSingleLine: true }],
'comma-dangle': ['error', 'always-multiline'],
'comma-spacing': 'error',
'comma-style': 'error',
'curly': ['error', 'multi-line', 'consistent'],
curly: ['error', 'multi-line', 'consistent'],
'dot-location': ['error', 'property'],
'handle-callback-err': 'off',
'indent': ['error', 'tab'],
indent: ['error', 'tab'],
'keyword-spacing': 'error',
'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-function': 'error',
'no-floating-decimal': 'error',
'no-inline-comments': 'error',
'no-lonely-if': 'error',
'no-multi-spaces': 'error',
'no-multiple-empty-lines': ['error', { 'max': 2, 'maxEOF': 1, 'maxBOF': 0 }],
'no-shadow': ['error', { 'allow': ['err', 'resolve', 'reject'] }],
'no-multiple-empty-lines': ['error', { max: 2, maxEOF: 1, maxBOF: 0 }],
'no-shadow': ['error', { allow: ['err', 'resolve', 'reject'] }],
'no-trailing-spaces': ['error'],
'no-var': 'error',
'no-undef': 'off',
'object-curly-spacing': ['error', 'always'],
'prefer-const': 'error',
'quotes': ['error', 'single'],
'semi': ['error', 'always'],
quotes: ['error', 'single'],
semi: ['error', 'always'],
'space-before-blocks': 'error',
'space-before-function-paren': ['error', {
'anonymous': 'never',
'named': 'never',
'asyncArrow': 'always',
anonymous: 'never',
named: 'never',
asyncArrow: 'always',
}],
'space-in-parens': 'error',
'space-infix-ops': 'error',
'space-unary-ops': 'error',
'spaced-comment': 'error',
'yoda': 'error',
yoda: 'error',
},
},
];
Expand Down
Loading