-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated dependencies and version bump to 2.4.0-rc1
WE2-1018 - All dependencies updated - Version bump to 2.4.0-rc1 - Version in package.json can now have a release candidate suffix which will be excluded in the extension manifest - Migrated `eslint` to the new flat config file format - The `@typescript-eslint/eslint-plugin` and `@typescript-eslint/parser` packages are deprecated, changed to the new `typescript-eslint` package which contains both. - New dependency `@stylistic/eslint-plugin-ts` - Some linter rules have been deprecated or removed from the `typescript-eslint` project and migrated to `@stylistic`, for example the `semi` rule. - Fixed some minor linter errors - Added additional linter rule overrides. These rules should be checked separately and might require fixes in the code. - Renamed `rollup.config.js` to `rollup.config.mjs` as it was a ES6 module and not a CommonJS file - Removed `findFiles` from `build-utils.mjs`. It was a promise wrapper for `glob`. After updating `glob`, it now returns a promise by itself, so the wrapper was unnecessary. - Moved `bootstrap` from `devDependencies` to `dependencies`, which should now correctly reflect how it's used. Signed-off-by: Tanel Metsar <taneltm@users.noreply.github.com>
- Loading branch information
Showing
13 changed files
with
3,135 additions
and
2,258 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
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,76 @@ | ||
// @ts-check | ||
import globals from "globals"; | ||
import eslint from "@eslint/js"; | ||
import tseslint from "typescript-eslint"; | ||
import stylisticTs from '@stylistic/eslint-plugin-ts'; | ||
|
||
export default tseslint.config( | ||
{ | ||
extends: [ | ||
eslint.configs.recommended, | ||
tseslint.configs.recommendedTypeChecked, | ||
tseslint.configs.stylisticTypeChecked, | ||
], | ||
|
||
files: ["src/**/*.ts"], | ||
|
||
ignores: [ | ||
"bin/", | ||
"dist/", | ||
"lib/**/*", | ||
"**/__tests__/**/*" | ||
], | ||
|
||
plugins: { | ||
'@stylistic/ts': stylisticTs, | ||
'@typescript-eslint': tseslint.plugin, | ||
}, | ||
|
||
languageOptions: { | ||
sourceType: "module", | ||
globals: { | ||
...globals.browser, | ||
...globals.node, | ||
...globals.es2021, | ||
...globals.webextensions, | ||
}, | ||
parserOptions: { | ||
projectService: true, | ||
tsconfigRootDir: import.meta.dirname, | ||
}, | ||
}, | ||
|
||
rules: { | ||
"quotes": "error", | ||
"key-spacing": ["error", { "align": "value" }], | ||
"comma-dangle": ["error", "only-multiline"], | ||
"object-curly-spacing": ["error", "always"], | ||
"array-bracket-spacing": "error", | ||
"indent": ["error", 2, { "SwitchCase": 1 }], | ||
"sort-imports": ["error", { allowSeparatedGroups: true }], | ||
|
||
"@stylistic/ts/semi": "error", | ||
|
||
"@typescript-eslint/array-type": ["error", { default: "generic" }], | ||
|
||
// The following rules override the default "error" setting. | ||
// These cases should be investigated and the overrides | ||
// should either be removed or set to "off". | ||
"@typescript-eslint/no-explicit-any": "warn", | ||
"@typescript-eslint/no-floating-promises": "warn", | ||
"@typescript-eslint/no-unsafe-argument": "warn", | ||
"@typescript-eslint/no-unsafe-assignment": "warn", | ||
"@typescript-eslint/no-unsafe-member-access": "warn", | ||
"@typescript-eslint/no-unused-expressions": "warn", | ||
"@typescript-eslint/no-unsafe-return": "warn", | ||
"@typescript-eslint/no-unsafe-call": "warn", | ||
"@typescript-eslint/prefer-promise-reject-errors": "warn", | ||
"@typescript-eslint/prefer-regexp-exec": "warn", | ||
"@typescript-eslint/prefer-nullish-coalescing": "warn", | ||
"@typescript-eslint/consistent-type-definitions": "warn", | ||
"@typescript-eslint/no-misused-promises": "warn", | ||
"@typescript-eslint/dot-notation": "warn", | ||
"@typescript-eslint/restrict-plus-operands": "warn", | ||
}, | ||
}, | ||
); |
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.