vality.dev/.eslintrc.js
2022-12-28 14:06:59 +06:00

57 lines
1.2 KiB
JavaScript

module.exports = {
globals: {
__PATH_PREFIX__: true,
},
extends: [
"react-app",
"plugin:import/recommended",
"plugin:import/typescript",
],
plugins: ["import", "unused-imports"],
rules: {
// import
"import/no-unresolved": "off",
"import/order": [
"error",
{
groups: [
["builtin", "external"],
"internal",
["parent", "sibling", "index"],
"object",
],
pathGroups: [
{
pattern: "~/**",
group: "internal",
},
{
pattern: "react",
group: "external",
position: "before",
},
],
pathGroupsExcludedImportTypes: ["builtin"],
"newlines-between": "always",
alphabetize: {
order: "asc",
caseInsensitive: true,
},
},
],
// unused-imports
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": "off",
"unused-imports/no-unused-imports": "warn",
"unused-imports/no-unused-vars": [
"warn",
{
vars: "all",
varsIgnorePattern: "^_",
args: "after-used",
argsIgnorePattern: "^_",
},
],
},
};