-
Notifications
You must be signed in to change notification settings - Fork 0
Support ESLint 9 #33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Support ESLint 9 #33
Changes from 18 commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
0e1d764
chore: update test configs
jkoenig134 f43f34f
chore: rm lockfile
jkoenig134 a9ae2c2
chore: rm mocha
jkoenig134 d40dabb
chore: gitignore lockfile
jkoenig134 53a6cd4
refactor: migrate to eslint 9
jkoenig134 2c3929d
chore: bump libs
jkoenig134 0990b14
chore: remove dep
jkoenig134 1557d4d
Merge branch 'main' into support-eslint-9
jkoenig134 ca02524
fix: tes
jkoenig134 e88b6d7
chore: remove language options
jkoenig134 dad6647
fix: add d.ts
jkoenig134 0bfe816
fix: add types
jkoenig134 62e75a9
fix: name
jkoenig134 6320bee
fix: import ts files
jkoenig134 92f928c
fix: remove accidentally committed file
jkoenig134 00a3ae9
chore: simplify test config
jkoenig134 a500264
chore: de-simplify
jkoenig134 7d62b9c
fix: re-add mocha
jkoenig134 f0831c4
chore: do not install eslint 8
jkoenig134 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,194 @@ | ||
| // @ts-check | ||
|
|
||
| import tseslint from "typescript-eslint" | ||
|
|
||
| export default tseslint.config(tseslint.configs.base, { | ||
| files: ["**/*.ts"], | ||
| linterOptions: { | ||
| reportUnusedDisableDirectives: true | ||
| }, | ||
| rules: { | ||
| "no-unused-vars": "off", | ||
| "@typescript-eslint/no-unused-vars": [ | ||
| "error", | ||
| { | ||
| args: "all", | ||
| argsIgnorePattern: "^_", | ||
| caughtErrors: "all", | ||
| caughtErrorsIgnorePattern: "^_", | ||
| destructuredArrayIgnorePattern: "^_", | ||
| varsIgnorePattern: "^_", | ||
| ignoreRestSiblings: true | ||
| } | ||
| ], | ||
| "@typescript-eslint/no-floating-promises": "error", | ||
| "@typescript-eslint/adjacent-overload-signatures": "error", | ||
| "@typescript-eslint/array-type": [ | ||
| "error", | ||
| { | ||
| default: "array" | ||
| } | ||
| ], | ||
| "@typescript-eslint/consistent-type-definitions": ["error", "interface"], | ||
| "@typescript-eslint/await-thenable": "error", | ||
| "@typescript-eslint/consistent-indexed-object-style": ["error", "record"], | ||
| "@typescript-eslint/explicit-member-accessibility": [ | ||
| "error", | ||
| { | ||
| accessibility: "explicit" | ||
| } | ||
| ], | ||
| "@typescript-eslint/method-signature-style": ["error", "method"], | ||
| "@typescript-eslint/no-extra-non-null-assertion": "error", | ||
| "@typescript-eslint/no-inferrable-types": "error", | ||
| "@typescript-eslint/no-misused-new": "error", | ||
| "@typescript-eslint/no-non-null-asserted-optional-chain": "error", | ||
| "@typescript-eslint/no-require-imports": "error", | ||
| "@typescript-eslint/no-unnecessary-boolean-literal-compare": "error", | ||
| "@typescript-eslint/no-unnecessary-condition": "error", | ||
| "@typescript-eslint/no-unnecessary-type-assertion": "error", | ||
| // "@typescript-eslint/no-unsafe-return": "error", | ||
| "@typescript-eslint/non-nullable-type-assertion-style": "error", | ||
| "@typescript-eslint/prefer-for-of": "error", | ||
| "@typescript-eslint/prefer-includes": "error", | ||
| "@typescript-eslint/prefer-literal-enum-member": "error", | ||
| "@typescript-eslint/prefer-nullish-coalescing": "error", | ||
| "@typescript-eslint/prefer-optional-chain": "error", | ||
| "@typescript-eslint/prefer-readonly": "error", | ||
| "@typescript-eslint/prefer-return-this-type": "error", | ||
| "@typescript-eslint/prefer-string-starts-ends-with": "error", | ||
| "@typescript-eslint/prefer-ts-expect-error": "error", | ||
| "@typescript-eslint/require-array-sort-compare": ["error", { ignoreStringArrays: true }], | ||
| "@typescript-eslint/switch-exhaustiveness-check": "error", | ||
| "no-return-await": "off", | ||
| "@typescript-eslint/return-await": ["error", "always"], | ||
| "@typescript-eslint/require-await": "error", | ||
| "no-useless-constructor": "off", | ||
| "@typescript-eslint/no-useless-constructor": "error", | ||
| "@typescript-eslint/explicit-module-boundary-types": [ | ||
| "error", | ||
| { | ||
| allowArgumentsExplicitlyTypedAsAny: true | ||
| } | ||
| ], | ||
| "no-dupe-class-members": "off", | ||
| "@typescript-eslint/no-dupe-class-members": ["error"], | ||
| "no-empty-function": "off", | ||
| "@typescript-eslint/no-empty-function": "error", | ||
| "@typescript-eslint/naming-convention": [ | ||
| "error", | ||
| { | ||
| selector: "default", | ||
| format: ["camelCase"], | ||
| leadingUnderscore: "allow" | ||
| }, | ||
| { | ||
| selector: "variable", | ||
| format: ["camelCase", "UPPER_CASE"], | ||
| leadingUnderscore: "allow" | ||
| }, | ||
| { | ||
| selector: "typeLike", | ||
| format: ["PascalCase"] | ||
| }, | ||
| { | ||
| selector: "enumMember", | ||
| format: ["PascalCase"] | ||
| }, | ||
| { | ||
| selector: "classProperty", | ||
| format: ["camelCase", "UPPER_CASE"], | ||
| leadingUnderscore: "allow" | ||
| }, | ||
| { | ||
| selector: "property", | ||
| format: null, | ||
| custom: { | ||
| regex: "^(@type|@version|@context|(\\$?[a-z0-9]+)([A-Z][a-z0-9]*)*)(\\.(@type|@version|@context|[a-z0-9]+([A-Z][a-z0-9]*)*))*$", | ||
| match: true | ||
| } | ||
| } | ||
| ], | ||
| "no-caller": "error", | ||
| "no-extend-native": "error", | ||
| "no-extra-bind": "error", | ||
| "no-new-object": "error", | ||
| "no-new-wrappers": "error", | ||
| "no-throw-literal": "error", | ||
| "no-with": "error", | ||
| "prefer-promise-reject-errors": "error", | ||
| "no-array-constructor": "error", | ||
| "no-multi-str": "error", | ||
| "one-var": [ | ||
| "error", | ||
| { | ||
| var: "never", | ||
| let: "never", | ||
| const: "never" | ||
| } | ||
| ], | ||
| "spaced-comment": ["error", "always"], | ||
| "constructor-super": "error", | ||
| "no-new-symbol": "error", | ||
| "no-this-before-super": "error", | ||
| "no-var": "error", | ||
| "prefer-const": ["error", { destructuring: "all" }], | ||
| "prefer-rest-params": "error", | ||
| "prefer-spread": "error", | ||
| curly: ["error", "multi-line"], | ||
| "getter-return": "error", | ||
| "no-console": "error", | ||
| "no-constant-condition": "error", | ||
| "no-debugger": "error", | ||
| "no-dupe-args": "error", | ||
| "no-dupe-else-if": "error", | ||
| "no-dupe-keys": "error", | ||
| "no-duplicate-case": "error", | ||
| "no-ex-assign": "error", | ||
| "no-extra-boolean-cast": "error", | ||
| "no-import-assign": "error", | ||
| "no-invalid-regexp": "error", | ||
| "no-setter-return": "error", | ||
| "no-sparse-arrays": "error", | ||
| "no-unreachable": "error", | ||
| "no-unreachable-loop": "error", | ||
| "no-unsafe-finally": "error", | ||
| "no-unsafe-negation": "error", | ||
| "no-unsafe-optional-chaining": "error", | ||
| "use-isnan": "error", | ||
| "valid-typeof": "error", | ||
| "array-callback-return": "error", | ||
| "default-case-last": "error", | ||
| eqeqeq: "error", | ||
| "grouped-accessor-pairs": "error", | ||
| "no-alert": "error", | ||
| "no-constructor-return": "error", | ||
| "no-else-return": "error", | ||
| "no-eval": "error", | ||
| "no-extra-label": "error", | ||
| "no-implied-eval": "error", | ||
| "no-lone-blocks": "error", | ||
| "no-loop-func": "error", | ||
| "no-new": "error", | ||
| "no-new-func": "error", | ||
| "no-return-assign": "error", | ||
| "no-self-assign": "error", | ||
| "no-self-compare": "error", | ||
| "no-sequences": "error", | ||
| "no-unmodified-loop-condition": "error", | ||
| "no-unused-labels": "error", | ||
| "no-useless-call": "error", | ||
| "no-useless-catch": "error", | ||
| "no-useless-concat": "error", | ||
| "no-useless-escape": "error", | ||
| "no-void": "error", | ||
| yoda: "error", | ||
| "no-unused-expressions": "error", | ||
| "no-lonely-if": "error", | ||
| "no-duplicate-imports": "error", | ||
| "no-useless-rename": "error", | ||
| "prefer-template": "error", | ||
| "require-yield": "error", | ||
| "no-empty": "error" | ||
| } | ||
| }) | ||
This file contains hidden or 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,11 @@ | ||
| import { ConfigArray } from "typescript-eslint" | ||
|
|
||
| declare const base: ConfigArray | ||
| declare const jest: ConfigArray | ||
| declare const mocha: ConfigArray | ||
| declare const withFormatting: ConfigArray | ||
|
|
||
| declare const base: ConfigArray | ||
| export default base | ||
|
|
||
| export const configs = { base, jest, mocha, withFormatting } |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.