This repository has been archived on 2024-03-17. You can view files and clone it, but cannot push or open issues or pull requests.
woj-ui/.eslintrc.cjs

45 lines
1.3 KiB
JavaScript
Raw Permalink Normal View History

2023-07-15 20:55:17 +08:00
module.exports = {
2023-12-23 15:20:36 +08:00
env: {
browser: true,
es2021: true,
},
2023-07-16 19:33:43 +08:00
extends: [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking",
2023-12-23 15:20:36 +08:00
"plugin:react/recommended",
2023-07-16 19:33:43 +08:00
"plugin:react-hooks/recommended",
2023-12-23 15:20:36 +08:00
"eslint-config-prettier",
],
overrides: [
{
env: { node: true },
files: [".eslintrc.{js,cjs}"],
parserOptions: { sourceType: "script" },
},
2023-07-15 20:55:17 +08:00
],
2023-12-23 15:20:36 +08:00
settings: { react: { version: "detect" } },
2023-07-16 19:33:43 +08:00
parser: "@typescript-eslint/parser",
parserOptions: {
ecmaVersion: "latest",
sourceType: "module",
project: true,
2023-12-23 15:20:36 +08:00
tsconfigRootDir: __dirname,
2023-07-16 19:33:43 +08:00
},
2023-12-23 15:20:36 +08:00
plugins: ["@typescript-eslint", "react", "react-refresh", "prettier"],
2023-07-16 19:33:43 +08:00
rules: {
2023-12-23 15:20:36 +08:00
"linebreak-style": ["error", "unix"],
"quotes": ["error", "double"],
"react/react-in-jsx-scope": ["off"],
2023-07-22 14:01:51 +08:00
"@typescript-eslint/no-unused-vars": [
"warn",
{
"argsIgnorePattern": "^_",
"varsIgnorePattern": "^_",
2023-12-23 15:20:36 +08:00
"caughtErrorsIgnorePattern": "^_",
},
],
"prettier/prettier": ["error"],
},
2023-07-16 19:33:43 +08:00
};