Skip to content

Commit

Permalink
feat(deps)!: update dependency eslint to v9 (#41)
Browse files Browse the repository at this point in the history
* chore(deps): update dependency eslint to v9

* chore(deps): Update peerDependencies

* feat!: package.json maintenance, imported eslint recommended config

* chore(deps): Bump to eslint 9.4.0

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Bartosz <burtekdotryw@gmail.com>
  • Loading branch information
renovate[bot] and burtek committed Aug 8, 2024
1 parent b018dba commit 6a23fbe
Show file tree
Hide file tree
Showing 3 changed files with 91 additions and 1,205 deletions.
54 changes: 3 additions & 51 deletions configs/base.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import js from '@eslint/js';
import stylisticPlugin from '@stylistic/eslint-plugin';
import * as importPlugin from 'eslint-plugin-import-x';
import promise from 'eslint-plugin-promise';
Expand Down Expand Up @@ -35,71 +36,44 @@ export function prepareConfig() {
promise
},
rules: {
...js.configs.recommended.rules,
'accessor-pairs': 'error',
'array-callback-return': 'error',
'arrow-body-style': 'error',
'block-spacing': 'error',
'brace-style': 'error',
'camelcase': 'error',
'consistent-return': 'error',
'constructor-super': 'error',
'curly': 'error',
'default-case': 'error',
'default-case-last': 'error',
'dot-notation': 'error',
'eqeqeq': 'error',
'for-direction': 'error',
'func-names': 'error',
'func-style': ['error', 'declaration', { allowArrowFunctions: true }],
'getter-return': 'error',
'grouped-accessor-pairs': 'error',
'guard-for-in': 'error',
'new-cap': 'error',
'no-alert': 'error',
'no-array-constructor': 'error',
'no-async-promise-executor': 'error',
'no-await-in-loop': 'error',
'no-caller': 'error',
'no-case-declarations': 'error',
'no-class-assign': 'error',
'no-compare-neg-zero': 'error',
'no-cond-assign': ['error', 'always'],
'no-console': 'error',
'no-const-assign': 'error',
'no-constant-binary-expression': 'error',
'no-constant-condition': 'error',
'no-constructor-return': 'error',
'no-continue': 'error',
'no-control-regex': 'error',
'no-debugger': 'error',
'no-delete-var': 'error',
'no-div-regex': 'error',
'no-dupe-args': 'error',
'no-dupe-class-members': 'error',
'no-dupe-else-if': 'error',
'no-dupe-keys': 'error',
'no-duplicate-case': 'error',
'no-else-return': 'error',
'no-empty': ['error', { allowEmptyCatch: true }],
'no-empty-character-class': 'error',
'no-empty-function': 'error',
'no-empty-pattern': 'error',
'no-empty-static-block': 'error',
'no-eval': 'error',
'no-ex-assign': 'error',
'no-extend-native': 'error',
'no-extra-bind': 'error',
'no-extra-boolean-cast': 'error',
'no-fallthrough': ['error', { allowEmptyCase: true }],
'no-func-assign': 'error',
'no-global-assign': 'error',
'no-implicit-coercion': ['error', { allow: ['!!'] }],
'no-implied-eval': 'error',
'no-import-assign': 'error',
'no-inner-declarations': 'error',
'no-invalid-regexp': 'error',
'no-invalid-this': 'error',
'no-irregular-whitespace': 'error',
'no-iterator': 'error',
'no-labels': 'error',
'no-lone-blocks': 'error',
Expand All @@ -115,46 +89,28 @@ export function prepareConfig() {
ignoreDefaultValues: true
}
],
'no-misleading-character-class': 'error',
'no-multi-assign': 'error',
'no-multi-str': 'error',
'no-negated-condition': 'error',
'no-nested-ternary': 'warn',
'no-new': 'error',
'no-new-func': 'error',
'no-new-native-nonconstructor': 'error',
'no-new-wrappers': 'error',
'no-nonoctal-decimal-escape': 'error',
'no-obj-calls': 'error',
'no-object-constructor': 'error',
'no-octal': 'error',
'no-octal-escape': 'error',
'no-param-reassign': 'error',
'no-promise-executor-return': 'error',
'no-redeclare': 'error',
'no-regex-spaces': 'error',
'no-return-assign': 'error',
'no-script-url': 'error',
'no-self-assign': 'error',
'no-self-compare': 'error',
'no-sequences': 'error',
'no-setter-return': 'error',
'no-shadow': 'error',
'no-shadow-restricted-names': 'error',
'no-sparse-arrays': 'error',
'no-template-curly-in-string': 'warn',
'no-this-before-super': 'error',
'no-throw-literal': 'error',
'no-undef': 'error',
'no-undef-init': 'error',
'no-unexpected-multiline': 'error',
'no-unmodified-loop-condition': 'error',
'no-unreachable': 'error',
'no-unreachable-loop': 'error',
'no-unsafe-finally': 'error',
'no-unsafe-negation': 'error',
'no-unused-expressions': 'error',
'no-unused-labels': 'error',
'no-unused-vars': [
'error',
{
Expand All @@ -165,17 +121,14 @@ export function prepareConfig() {
],
'no-use-before-define': ['error', { classes: true, functions: false, variables: true }],
'no-useless-call': 'error',
'no-useless-catch': 'error',
'no-useless-computed-key': 'error',
'no-useless-concat': 'error',
'no-useless-constructor': 'error',
'no-useless-escape': 'error',
'no-useless-rename': 'error',
'no-useless-return': 'error',
'no-var': 'error',
'no-void': ['error', { allowAsStatement: true }],
'no-warning-comments': 'error',
'no-with': 'error',
'object-shorthand': 'error',
'one-var': ['error', 'never'],
'operator-assignment': 'error',
Expand All @@ -193,9 +146,7 @@ export function prepareConfig() {
'radix': 'error',
'require-atomic-updates': 'error',
'require-await': 'error',
'require-yield': 'error',
'symbol-description': 'error',
'use-isnan': 'error',
'valid-typeof': ['error', { requireStringLiterals: true }],
'yoda': ['error', 'never', { exceptRange: true }],

Expand Down Expand Up @@ -353,6 +304,7 @@ export function prepareConfig() {
'no-magic-numbers': 'off',
'no-shadow': 'off',
'no-throw-literal': 'off', // extended by tseslint/only-throw-error
'no-unsafe-optional-chaining': 'off',
'no-unused-expressions': 'off',
'no-unused-vars': 'off',
'no-use-before-define': 'off',
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@
},
"devDependencies": {
"@types/eslint": "^8.56.8",
"@types/eslint__js": "^8.42.3",
"@types/jest": "^29.5.12",
"@types/node": "*",
"@types/node": "^20.14.2",
"commit-and-tag-version": "^12.2.0",
"eslint": "^8.57.0",
"eslint-plugin-mdx": "^3.1.5",
"eslint": "^9.4.0",
"exit-code": "^1.0.2",
"jest": "^29.7.0",
"rimraf": "^6.0.0",
Expand All @@ -47,7 +47,7 @@
"typescript": "~5.5.2"
},
"peerDependencies": {
"eslint": "^8.56",
"eslint": "^^9.4.0",
"typescript": ">=4.7.4"
},
"private": false,
Expand Down
Loading

0 comments on commit 6a23fbe

Please sign in to comment.