-
Notifications
You must be signed in to change notification settings - Fork 192
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: modernize linting to use eslint 9 (#459)
* build(deps-dev): bump @typescript-eslint/eslint-plugin Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 7.10.0 to 8.0.1. - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.0.1/packages/eslint-plugin) --- updated-dependencies: - dependency-name: "@typescript-eslint/eslint-plugin" dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> * fix * chore: modernize linting to use eslint 9 * Apply suggestions from code review * fix more --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
- Loading branch information
1 parent
de15400
commit f15c7d2
Showing
20 changed files
with
398 additions
and
850 deletions.
There are no files selected for viewing
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
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
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,66 @@ | ||
import stylisticJs from '@stylistic/eslint-plugin-js' | ||
import eslint from '@eslint/js'; | ||
import tseslint from 'typescript-eslint'; | ||
import globals from 'globals'; | ||
|
||
export default tseslint.config( | ||
{ ignores: ["lib", "examples", "bench"] }, | ||
eslint.configs.recommended, | ||
...tseslint.configs.recommended, | ||
...tseslint.configs.stylistic, | ||
{ | ||
"languageOptions": { | ||
"parser": tseslint.parser, | ||
"parserOptions": { | ||
"lib": ["es2023"], | ||
"module": "commonjs", | ||
"moduleResolution": "node", | ||
"target": "es2022", | ||
|
||
"strict": true, | ||
"esModuleInterop": true, | ||
"skipLibCheck": true, | ||
"include": [ | ||
"bin/**/*.ts", | ||
"src/**/*.ts", | ||
"test/**/*.ts" | ||
], | ||
"outDir": "./lib", | ||
"declaration": true, | ||
"pretty": true, | ||
"sourceMap": true | ||
}, | ||
"globals": { | ||
...globals.commonjs, | ||
...globals.node, | ||
...globals.es6 | ||
}, | ||
}, | ||
}, | ||
{ | ||
plugins: { | ||
'@stylistic/js': stylisticJs | ||
}, | ||
files: [ | ||
"bin/**/*.ts", | ||
'bench/**/*.ts', | ||
'src/**/*.ts', | ||
'test/**/*.ts', | ||
], | ||
rules: { | ||
'@stylistic/js/max-len': [ 2, { | ||
'code': 120, | ||
'ignoreComments': true | ||
} ], | ||
"@stylistic/js/array-bracket-spacing": ["error", "always"], | ||
"@stylistic/js/operator-linebreak": ["error", "after"], | ||
"@stylistic/js/linebreak-style": ["error", "unix"], | ||
"@stylistic/js/brace-style": ["error", "1tbs", { "allowSingleLine": true }], | ||
'@stylistic/js/indent': ["error", 2, { | ||
"SwitchCase": 1, | ||
"FunctionDeclaration": { "parameters": "first" }, | ||
"FunctionExpression": { "parameters": "first" } | ||
}], | ||
} | ||
} | ||
); |
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
Oops, something went wrong.