60 lines
1.4 KiB
JavaScript
60 lines
1.4 KiB
JavaScript
import js from "@eslint/js";
|
|
import typescript from "@typescript-eslint/eslint-plugin";
|
|
import typescriptParser from "@typescript-eslint/parser";
|
|
import react from "eslint-plugin-react";
|
|
import prettier from "eslint-plugin-prettier";
|
|
import cssModules from "eslint-plugin-css-modules";
|
|
import storybook from "eslint-plugin-storybook";
|
|
|
|
export default [
|
|
js.configs.recommended,
|
|
{
|
|
files: ["**/*.{js,jsx,ts,tsx}"],
|
|
languageOptions: {
|
|
parser: typescriptParser,
|
|
parserOptions: {
|
|
sourceType: "module",
|
|
ecmaVersion: 2020,
|
|
ecmaFeatures: {
|
|
jsx: true,
|
|
},
|
|
},
|
|
},
|
|
plugins: {
|
|
"@typescript-eslint": typescript,
|
|
react,
|
|
prettier,
|
|
"css-modules": cssModules,
|
|
storybook,
|
|
},
|
|
settings: {
|
|
"import/resolver": {
|
|
node: {
|
|
extensions: [".js", ".jsx", ".ts", ".tsx"],
|
|
},
|
|
},
|
|
react: {
|
|
version: "detect",
|
|
},
|
|
},
|
|
rules: {
|
|
...typescript.configs.recommended.rules,
|
|
...react.configs.recommended.rules,
|
|
...prettier.configs.recommended.rules,
|
|
"@typescript-eslint/no-var-requires": "off",
|
|
"@typescript-eslint/no-explicit-any": "off",
|
|
"react/react-in-jsx-scope": "off",
|
|
"no-undef": "off",
|
|
},
|
|
},
|
|
{
|
|
files: ["**/*.stories.{js,jsx,ts,tsx}"],
|
|
rules: {
|
|
...storybook.configs.recommended.rules,
|
|
},
|
|
},
|
|
{
|
|
ignores: ["dist/**", "node_modules/**", "build/**"],
|
|
},
|
|
];
|