-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build(deps-dev): Bump eslint from 8.56.0 to 9.14.0 (#254)
* build(deps-dev): Bump eslint from 8.56.0 to 9.14.0 * migrate eslint config, update plugins Bumps [eslint](https://github.com/eslint/eslint) from 8.56.0 to 9.14.0. - [Release notes](https://github.com/eslint/eslint/releases) - [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md) - [Commits](eslint/eslint@v8.56.0...v9.14.0) --- updated-dependencies: - dependency-name: eslint dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Ben Drucker <bvdrucker@gmail.com>
- Loading branch information
1 parent
2f24625
commit c560e87
Showing
5 changed files
with
1,901 additions
and
1,102 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,211 @@ | ||
const babelParser = require('@babel/eslint-parser'); | ||
const { fixupPluginRules } = require('@eslint/compat'); | ||
const { FlatCompat } = require('@eslint/eslintrc'); | ||
const js = require('@eslint/js'); | ||
const _import = require('eslint-plugin-import'); | ||
const jest = require('eslint-plugin-jest'); | ||
const jsdoc = require('eslint-plugin-jsdoc'); | ||
const promise = require('eslint-plugin-promise'); | ||
const security = require('eslint-plugin-security'); | ||
const globals = require('globals'); | ||
|
||
const compat = new FlatCompat({ | ||
baseDirectory: __dirname, | ||
recommendedConfig: js.configs.recommended, | ||
allConfig: js.configs.all, | ||
}); | ||
|
||
module.exports = [ | ||
{ | ||
ignores: ['**/dist/'], | ||
}, | ||
...compat.extends('eslint:recommended', 'prettier', 'plugin:prettier/recommended'), | ||
{ | ||
plugins: { | ||
jsdoc, | ||
jest, | ||
promise, | ||
security, | ||
import: fixupPluginRules(_import), | ||
}, | ||
|
||
languageOptions: { | ||
globals: { | ||
...globals.node, | ||
}, | ||
|
||
parser: babelParser, | ||
ecmaVersion: 5, | ||
sourceType: 'commonjs', | ||
|
||
parserOptions: { | ||
requireConfigFile: false, | ||
sourceType: 'script', | ||
}, | ||
}, | ||
|
||
settings: { | ||
'import/resolver': { | ||
node: { | ||
extensions: ['.js', '.ts'], | ||
}, | ||
}, | ||
|
||
jsdoc: { | ||
preferredTypes: { | ||
Array: 'Array<object>', | ||
'Array.': 'Array<object>', | ||
'Array<>': '[]', | ||
'Array.<>': '[]', | ||
'Promise.<>': 'Promise<>', | ||
}, | ||
}, | ||
}, | ||
|
||
rules: { | ||
'prettier/prettier': [ | ||
'error', | ||
{}, | ||
{ | ||
usePrettierrc: true, | ||
}, | ||
], | ||
|
||
curly: ['error', 'all'], | ||
'callback-return': ['error', ['callback', 'cb', 'next', 'done']], | ||
'class-methods-use-this': 'off', | ||
'consistent-return': 'off', | ||
'handle-callback-err': ['error', '^.*err'], | ||
'new-cap': 'off', | ||
'no-console': 'error', | ||
'no-else-return': 'error', | ||
'no-eq-null': 'off', | ||
'no-global-assign': 'error', | ||
'no-loop-func': 'off', | ||
'no-lone-blocks': 'error', | ||
'no-negated-condition': 'error', | ||
'no-shadow': 'error', | ||
'no-template-curly-in-string': 'error', | ||
'no-undef': 'error', | ||
'no-underscore-dangle': 'off', | ||
'no-unsafe-negation': 'error', | ||
'no-use-before-define': ['error', 'nofunc'], | ||
'no-useless-rename': 'error', | ||
|
||
'padding-line-between-statements': [ | ||
'error', | ||
{ | ||
blankLine: 'always', | ||
|
||
prev: ['directive', 'block', 'block-like', 'multiline-block-like', 'cjs-export', 'cjs-import', 'class', 'export', 'import', 'if'], | ||
|
||
next: '*', | ||
}, | ||
{ | ||
blankLine: 'never', | ||
prev: 'directive', | ||
next: 'directive', | ||
}, | ||
{ | ||
blankLine: 'any', | ||
prev: '*', | ||
next: ['if', 'for', 'cjs-import', 'import'], | ||
}, | ||
{ | ||
blankLine: 'any', | ||
prev: ['export', 'import'], | ||
next: ['export', 'import'], | ||
}, | ||
{ | ||
blankLine: 'always', | ||
prev: '*', | ||
next: ['try', 'function', 'switch'], | ||
}, | ||
{ | ||
blankLine: 'always', | ||
prev: 'if', | ||
next: 'if', | ||
}, | ||
{ | ||
blankLine: 'never', | ||
prev: ['return', 'throw'], | ||
next: '*', | ||
}, | ||
], | ||
|
||
'no-new': 'off', | ||
'no-empty': 'error', | ||
'no-empty-function': 'error', | ||
'valid-jsdoc': 'off', | ||
yoda: 'error', | ||
'import/extensions': ['error', 'never'], | ||
'import/no-unresolved': 'off', | ||
|
||
'import/order': [ | ||
'error', | ||
{ | ||
'newlines-between': 'always', | ||
|
||
alphabetize: { | ||
order: 'asc', | ||
caseInsensitive: true, | ||
}, | ||
}, | ||
], | ||
|
||
'jsdoc/check-alignment': 'error', | ||
'jsdoc/check-indentation': 'off', | ||
'jsdoc/check-param-names': 'off', | ||
'jsdoc/check-tag-names': 'error', | ||
'jsdoc/check-types': 'error', | ||
'jsdoc/newline-after-description': 'off', | ||
'jsdoc/no-undefined-types': 'off', | ||
'jsdoc/require-description': 'off', | ||
'jsdoc/require-description-complete-sentence': 'off', | ||
'jsdoc/require-example': 'off', | ||
'jsdoc/require-hyphen-before-param-description': 'error', | ||
'jsdoc/require-param': 'error', | ||
'jsdoc/require-param-description': 'off', | ||
'jsdoc/require-param-name': 'error', | ||
'jsdoc/require-param-type': 'error', | ||
'jsdoc/require-returns-description': 'off', | ||
'jsdoc/require-returns-type': 'error', | ||
'jsdoc/valid-types': 'error', | ||
'promise/always-return': 'error', | ||
'promise/always-catch': 'off', | ||
|
||
'promise/catch-or-return': [ | ||
'error', | ||
{ | ||
allowThen: true, | ||
}, | ||
], | ||
|
||
'promise/no-native': 'off', | ||
'promise/param-names': 'error', | ||
'security/detect-buffer-noassert': 'error', | ||
'security/detect-child-process': 'error', | ||
'security/detect-disable-mustache-escape': 'error', | ||
'security/detect-eval-with-expression': 'error', | ||
'security/detect-new-buffer': 'error', | ||
'security/detect-no-csrf-before-method-override': 'error', | ||
'security/detect-non-literal-fs-filename': 'error', | ||
'security/detect-non-literal-regexp': 'error', | ||
'security/detect-non-literal-require': 'off', | ||
'security/detect-object-injection': 'off', | ||
'security/detect-possible-timing-attacks': 'error', | ||
'security/detect-pseudoRandomBytes': 'error', | ||
'security/detect-unsafe-regex': 'error', | ||
strict: 'off', | ||
}, | ||
}, | ||
{ | ||
files: ['**/*.test.js'], | ||
|
||
languageOptions: { | ||
globals: { | ||
...jest.environments.globals.globals, | ||
}, | ||
}, | ||
}, | ||
]; |
Oops, something went wrong.