-
-
Notifications
You must be signed in to change notification settings - Fork 221
feat: add types to ESLint Scope #709
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
base: main
Are you sure you want to change the base?
Changes from all commits
cb17887
32405cf
1907650
2c8789c
8bfd87e
0c5d30c
f5db7e9
de49286
3f2e836
dd149e7
c1cdcc4
40ec0e5
3a6865e
fa2f47f
15a753e
9a1c587
068df91
6ec9d0f
49cfa6c
1bd1cee
01fa38a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -2,7 +2,9 @@ import { defineConfig, globalIgnores } from "eslint/config"; | |||||
| import eslintConfigESLint from "eslint-config-eslint"; | ||||||
| import eslintConfigESLintFormatting from "eslint-config-eslint/formatting"; | ||||||
| import eslintPluginChaiFriendly from "eslint-plugin-chai-friendly"; | ||||||
| import * as expectType from "eslint-plugin-expect-type"; | ||||||
| import globals from "globals"; | ||||||
| import tsParser from "@typescript-eslint/parser"; | ||||||
|
|
||||||
| export default defineConfig([ | ||||||
| globalIgnores([ | ||||||
|
|
@@ -11,23 +13,20 @@ export default defineConfig([ | |||||
| "**/coverage/", | ||||||
| "packages/espree/tools/create-test-example.js" | ||||||
| ]), | ||||||
| eslintConfigESLint, | ||||||
| eslintConfigESLintFormatting, | ||||||
| { | ||||||
| files: ["packages/*/tests/lib/**"], | ||||||
| files: ["**/*.{,c}js"], | ||||||
| extends: [eslintConfigESLint, eslintConfigESLintFormatting] | ||||||
| }, | ||||||
| { | ||||||
| files: ["packages/*/tests/**/*.test.{,c}js"], | ||||||
| languageOptions: { | ||||||
| globals: { | ||||||
| ...globals.mocha | ||||||
| } | ||||||
| } | ||||||
| }, | ||||||
| { | ||||||
| files: ["packages/eslint-scope/tests/**"], | ||||||
| languageOptions: { | ||||||
| globals: { | ||||||
| ...globals.mocha | ||||||
| } | ||||||
| }, | ||||||
| files: ["packages/eslint-scope/tests/**/*.{,c}js"], | ||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Would it make sense to restrict its scope to test files? The related setups, like the
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks for the suggestion. I've addressed this in 068df91. Please, have a look! |
||||||
| plugins: { | ||||||
| "chai-friendly": eslintPluginChaiFriendly | ||||||
| }, | ||||||
|
|
@@ -68,6 +67,21 @@ export default defineConfig([ | |||||
| } | ||||||
| } | ||||||
| }, | ||||||
| { | ||||||
| files: ["packages/eslint-scope/tests/types/*.{,c}ts"], | ||||||
| languageOptions: { | ||||||
| parser: tsParser, | ||||||
| parserOptions: { | ||||||
| project: ["packages/eslint-scope/tests/types/tsconfig.json"] | ||||||
| } | ||||||
| }, | ||||||
| plugins: { | ||||||
| "expect-type": expectType | ||||||
| }, | ||||||
| rules: { | ||||||
| "expect-type/expect": "error" | ||||||
| } | ||||||
| }, | ||||||
| { | ||||||
| files: ["**/tools/**"], | ||||||
| rules: { | ||||||
|
|
||||||
Uh oh!
There was an error while loading. Please reload this page.