-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path.eslintrc.js
More file actions
71 lines (68 loc) · 2.29 KB
/
Copy path.eslintrc.js
File metadata and controls
71 lines (68 loc) · 2.29 KB
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
module.exports = {
ignorePatterns: ["**/*.stories.tsx", "**/*.stories.ts"], // Add this line
extends: [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:react/recommended",
"plugin:react-hooks/recommended",
"plugin:jsx-a11y/recommended",
"plugin:storybook/recommended"
],
parser: "@typescript-eslint/parser",
plugins: ["@typescript-eslint", "react", "react-hooks", "jsx-a11y", "./eslint-plugin-auraglass"],
parserOptions: {
ecmaVersion: 2022,
sourceType: "module",
ecmaFeatures: {
jsx: true
}
},
rules: {
// TypeScript specific
"@typescript-eslint/no-unused-vars": [
"error",
{
argsIgnorePattern: "^_"
}
],
"@typescript-eslint/explicit-module-boundary-types": "warn",
"@typescript-eslint/no-explicit-any": "error",
// React specific
"react/react-in-jsx-scope": "off",
"react/prop-types": "off",
// Accessibility rules (jsx-a11y)
"jsx-a11y/alt-text": "error",
"jsx-a11y/anchor-has-content": "error",
"jsx-a11y/anchor-is-valid": "error",
"jsx-a11y/aria-props": "error",
"jsx-a11y/aria-proptypes": "error",
"jsx-a11y/aria-unsupported-elements": "error",
"jsx-a11y/aria-role": "error",
"jsx-a11y/click-events-have-key-events": "warn",
"jsx-a11y/heading-has-content": "error",
"jsx-a11y/html-has-lang": "error",
"jsx-a11y/img-redundant-alt": "error",
"jsx-a11y/interactive-supports-focus": "error",
"jsx-a11y/label-has-associated-control": "error",
"jsx-a11y/media-has-caption": "warn",
"jsx-a11y/mouse-events-have-key-events": "warn",
"jsx-a11y/no-autofocus": "warn",
"jsx-a11y/no-distracting-elements": "error",
"jsx-a11y/no-noninteractive-element-interactions": "warn",
"jsx-a11y/no-redundant-roles": "error",
"jsx-a11y/role-has-required-aria-props": "error",
"jsx-a11y/role-supports-aria-props": "error",
"jsx-a11y/scope": "error",
"jsx-a11y/tabindex-no-positive": "error",
// AuraGlass Design System Rules
"auraglass/no-inline-glass": "error",
"auraglass/require-glass-tokens": "warn",
"auraglass/no-raw-tailwind": ["warn", { "allow": ["glass-", "sb-", "storybook-"] }],
"auraglass/no-inline-style-attr": "warn"
},
settings: {
react: {
version: "detect"
}
}
};