-
Notifications
You must be signed in to change notification settings - Fork 144
/
eslint.config.js
41 lines (40 loc) · 1.2 KB
/
eslint.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
import eslintPluginReact from "eslint-plugin-react";
import eslintPluginImport from "eslint-plugin-import";
import eslintPluginPrettier from "eslint-plugin-prettier";
import typescriptEslintPlugin from "@typescript-eslint/eslint-plugin";
import typescriptEslintParser from "@typescript-eslint/parser";
export default [
{
ignores: ["node_modules/**", "dist/**", ".next/**", "packages/shortest/node_modules/**", "packages/shortest/dist/**", "**/*.d.ts"],
},
{
files: ["**/*.ts", "**/*.tsx"],
languageOptions: {
parser: typescriptEslintParser,
parserOptions: {
ecmaFeatures: {
jsx: true,
},
ecmaVersion: "latest",
sourceType: "module",
},
},
plugins: {
"@typescript-eslint": typescriptEslintPlugin,
react: eslintPluginReact,
import: eslintPluginImport,
prettier: eslintPluginPrettier,
},
rules: {
"react/react-in-jsx-scope": "off",
"@typescript-eslint/no-unused-vars": ["error", { argsIgnorePattern: "^_" }],
"import/order": ["error", { alphabetize: { order: "asc" } }],
"prettier/prettier": "error",
},
settings: {
react: {
version: "detect",
},
},
},
];