-
-
Notifications
You must be signed in to change notification settings - Fork 716
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
958 additions
and
844 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
import { FlatCompat } from '@eslint/eslintrc' | ||
import loguxConfig from '@logux/eslint-config' | ||
import es5Plugin from 'eslint-plugin-es5' | ||
|
||
let compat = new FlatCompat({ | ||
baseDirectory: import.meta.dirname | ||
}) | ||
|
||
let es5 = compat.extends('plugin:es5/no-es2015') | ||
|
||
/** @type {import('eslint').Linter.FlatConfig[]} */ | ||
export default [ | ||
{ ignores: ['coverage'] }, | ||
...loguxConfig, | ||
...es5, | ||
{ | ||
plugins: { | ||
es5: es5Plugin | ||
}, | ||
rules: { | ||
'node-import/prefer-node-protocol': 'off', | ||
'perfectionist/sort-objects': 'off', | ||
'n/prefer-node-protocol': 'off', | ||
'prefer-let/prefer-let': 'off', | ||
'prefer-arrow-callback': 'off', | ||
'no-unused-vars': ['error', { caughtErrors: 'none' }], | ||
'n/global-require': 'off', | ||
'object-shorthand': 'off', | ||
'no-console': 'off', | ||
'no-var': 'off' | ||
} | ||
}, | ||
{ | ||
files: ['cli.js'], | ||
rules: { | ||
'n/no-unsupported-features/es-syntax': [ | ||
'error', | ||
{ | ||
version: '>=12.5.0', | ||
ignores: [] | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
files: ['test/**/*', 'eslint.config.mjs'], | ||
rules: { | ||
'n/no-unsupported-features/es-syntax': 'off', | ||
'es5/no-shorthand-properties': 'off', | ||
'es5/no-template-literals': 'off', | ||
'es5/no-rest-parameters': 'off', | ||
'es5/no-arrow-functions': 'off', | ||
'es5/no-destructuring': 'off', | ||
'es5/no-block-scoping': 'off', | ||
'es5/no-es6-methods': 'off', | ||
'es5/no-spread': 'off', | ||
'es5/no-for-of': 'off', | ||
'no-console': 'off' | ||
} | ||
}, | ||
{ | ||
files: ['eslint.config.mjs'], | ||
rules: { | ||
'es5/no-modules': 'off' | ||
} | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.