erp-platform/ui/.eslintrc.json
Sedat ÖZTÜRK e1a9562b22 init project
2025-05-06 09:45:49 +03:00

67 lines
2.2 KiB
JSON

{
"env": { "browser": true, "es2021": true },
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:react-hooks/recommended",
"plugin:react/recommended",
"standard-with-typescript",
"plugin:import/recommended",
"plugin:react/jsx-runtime",
"prettier",
// This disables the formatting rules in ESLint that Prettier is going to be responsible for handling.
// Make sure it's always the last config, so it gets the chance to override other configs.
"eslint-config-prettier"
],
"ignorePatterns": ["dist", ".eslintrc.json"],
"settings": {
"react": {
// Tells eslint-plugin-react to automatically detect the version of React to use.
"version": "detect"
},
"import/parsers": {
"@typescript-eslint/parser": [".ts", ".tsx"] // use typescript-eslint parser for .ts|tsx files.
},
// Tells eslint how to resolve imports
"import/resolver": {
// "node": {
// "paths": ["src"],
// "extensions": [".js", ".jsx", ".ts", ".tsx"]
// },
"typescript": {
"project": "./tsconfig.eslint.json",
"alwaysTryTypes": true // always try to resolve types under `<root>@types` directory even it doesn't contain any source code, like `@types/unist`.
}
}
},
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module",
"ecmaFeatures": { "jsx": true }
},
"plugins": ["react", "react-refresh", "typescript-eslint"],
"rules": {
// Add your own rules here to override ones from the extended configs.
"react-refresh/only-export-components": ["warn", { "allowConstantExport": true }],
// suppress errors for missing 'import React' in files
"react/react-in-jsx-scope": "off",
"import/first": "warn",
"import/default": "off",
"import/newline-after-import": "warn",
"import/no-named-as-default-member": "off",
"import/no-duplicates": "error",
"import/no-named-as-default": 0,
"react/prop-types": "off",
"react/jsx-sort-props": [
"warn",
{
"callbacksLast": true,
"shorthandFirst": true,
"ignoreCase": true,
"reservedFirst": true,
"noSortAlphabetically": true
}
]
}
}