eslint-config-scratch/lib/legacy/es6.mjs

52 lines
1.1 KiB
JavaScript
Raw Permalink Normal View History

/** @type {import('eslint').Linter.Config[]} */
2025-03-27 15:35:26 -07:00
export default [
{
languageOptions: {
2025-03-27 15:35:26 -07:00
globals: {},
ecmaVersion: 2018,
sourceType: 'script',
},
2016-10-21 16:56:05 -04:00
rules: {
2025-03-27 15:35:26 -07:00
'arrow-body-style': [2, 'as-needed'],
'arrow-parens': [2, 'as-needed'],
2025-03-27 15:35:26 -07:00
'arrow-spacing': [
2,
{
before: true,
after: true,
},
],
2025-03-27 15:35:26 -07:00
'no-prototype-builtins': [2],
'no-confusing-arrow': [2],
'no-duplicate-imports': [2],
'no-return-await': [2],
'no-template-curly-in-string': [2],
'no-useless-computed-key': [2],
'no-useless-constructor': [2],
'no-useless-rename': [2],
'no-var': [2],
'prefer-arrow-callback': [2],
2025-03-27 15:35:26 -07:00
'prefer-const': [
2,
{
destructuring: 'all',
},
],
2025-03-27 15:35:26 -07:00
'prefer-promise-reject-errors': [2],
'prefer-rest-params': [2],
'prefer-spread': [2],
'prefer-template': [2],
'require-atomic-updates': [2],
'require-await': [2],
'rest-spread-spacing': [2, 'never'],
'symbol-description': [2],
'template-curly-spacing': [2, 'never'],
},
},
]