-
-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
cab08a5
commit fa45624
Showing
33 changed files
with
2,382 additions
and
2,355 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,116 @@ | ||
import eslint from "@eslint/js" | ||
import tsParser from "@typescript-eslint/parser" | ||
import formatjs from "eslint-plugin-formatjs" | ||
import playwright from "eslint-plugin-playwright" | ||
import pluginPromise from "eslint-plugin-promise" | ||
import react from "eslint-plugin-react" | ||
import reactHooks from "eslint-plugin-react-hooks" | ||
import storybook from "eslint-plugin-storybook" | ||
import tsdoc from "eslint-plugin-tsdoc" | ||
import globals from "globals" | ||
import tseslint from "typescript-eslint" | ||
|
||
const config = tseslint.config([ | ||
{ | ||
ignores: [ | ||
"**/assets/*.js", | ||
"!.storybook", | ||
"**/dist/**", | ||
"**/storybook-static/**", | ||
"babel.config.js", | ||
"eslint.config.mjs", | ||
"examples/nextjs-spa/**", // This project is not maintained | ||
], | ||
}, | ||
eslint.configs.recommended, | ||
...tseslint.configs.recommendedTypeChecked, | ||
{ | ||
languageOptions: { | ||
parserOptions: { | ||
projectService: true, | ||
tsconfigRootDir: import.meta.dirname, | ||
}, | ||
}, | ||
}, | ||
pluginPromise.configs["flat/recommended"], | ||
storybook.configs["flat/recommended"], | ||
{ | ||
rules: { | ||
"@typescript-eslint/no-unused-vars": [ | ||
"error", | ||
{ | ||
args: "all", | ||
argsIgnorePattern: "^_", | ||
caughtErrors: "all", | ||
caughtErrorsIgnorePattern: "^_", | ||
destructuredArrayIgnorePattern: "^_", | ||
varsIgnorePattern: "^_", | ||
ignoreRestSiblings: true, | ||
}, | ||
], | ||
}, | ||
}, | ||
{ | ||
files: ["**/*.{js,jsx,mjs,cjs,ts,tsx}"], | ||
plugins: { | ||
react, | ||
"react-hooks": reactHooks, | ||
tsdoc, | ||
formatjs, | ||
}, | ||
|
||
languageOptions: { | ||
globals: { | ||
...globals.browser, | ||
...globals.node, | ||
}, | ||
|
||
parser: tsParser, | ||
ecmaVersion: 2021, | ||
sourceType: "module", | ||
|
||
parserOptions: { | ||
tsconfigRootDir: "./", | ||
|
||
ecmaFeatures: { | ||
jsx: true, | ||
}, | ||
}, | ||
}, | ||
|
||
rules: { | ||
...reactHooks.configs.recommended.rules, | ||
"tsdoc/syntax": "warn", | ||
"formatjs/no-offset": "error", | ||
"@typescript-eslint/no-floating-promises": "error", | ||
// The legacy elements is written with lots of any types | ||
"no-unused-vars": "off", | ||
"no-undef": "off", | ||
"@typescript-eslint/consistent-type-definitions": "off", | ||
"react/prop-types": "off", | ||
"@typescript-eslint/no-unsafe-assignment": "off", | ||
"@typescript-eslint/no-unsafe-member-access": "off", | ||
|
||
"@typescript-eslint/no-unused-vars": [ | ||
"error", | ||
{ | ||
argsIgnorePattern: "^_", | ||
varsIgnorePattern: "^_", | ||
caughtErrorsIgnorePattern: "^_", | ||
}, | ||
], | ||
|
||
"no-extra-semi": "off", | ||
}, | ||
}, | ||
{ | ||
files: ["src/**/*.spec.ts"], | ||
...playwright.configs["flat/recommended"], | ||
rules: { | ||
...playwright.configs["flat/recommended"].rules, | ||
"no-empty-pattern": "off", | ||
}, | ||
}, | ||
]) | ||
|
||
export default config |
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
File renamed without changes.
Oops, something went wrong.