47 lines
1.1 KiB
JavaScript
47 lines
1.1 KiB
JavaScript
module.exports = {
|
|
env: { browser: true, es2020: true },
|
|
extends: [
|
|
"eslint:recommended",
|
|
"react-app",
|
|
"airbnb-typescript",
|
|
"airbnb/hooks",
|
|
"plugin:@typescript-eslint/recommended",
|
|
"plugin:react/recommended",
|
|
"plugin:react-hooks/recommended",
|
|
"prettier", // Help to cooperate ESLint and Prettier
|
|
"plugin:prettier/recommended",
|
|
],
|
|
ignorePatterns: [
|
|
"/build",
|
|
"/dist",
|
|
"/node_modules",
|
|
"/.eslintrc.cjs",
|
|
"/vite.config.ts",
|
|
],
|
|
parser: "@typescript-eslint/parser",
|
|
parserOptions: {
|
|
ecmaVersion: "latest",
|
|
project: "./tsconfig.json",
|
|
sourceType: "module",
|
|
tsconfigRootDir: __dirname,
|
|
},
|
|
plugins: ["react-refresh"],
|
|
rules: {
|
|
// Run prettier separately but use its configuration
|
|
// This speeds up on-the-fly linting during development
|
|
"prettier/prettier": "off",
|
|
"react-refresh/only-export-components": "warn",
|
|
"import/no-extraneous-dependencies": [
|
|
"error",
|
|
{
|
|
devDependencies: true,
|
|
},
|
|
],
|
|
},
|
|
settings: {
|
|
react: {
|
|
version: "detect",
|
|
},
|
|
},
|
|
};
|