Skip to content

Commit 86623a0

Browse files
authored
Merge pull request #6559 from rebeckerspecialties/align-eslint-ajv
align dependencies so there isn't mixed versions of the `ajv` subdependency causing errors
2 parents e29d3f2 + bcfe220 commit 86623a0

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+11067
-8404
lines changed

.eslintignore

Lines changed: 0 additions & 5 deletions
This file was deleted.

.eslintrc.js

Lines changed: 0 additions & 66 deletions
This file was deleted.

.github/workflows/test-and-deploy-storybook.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414

1515
- uses: actions/setup-node@v3
1616
with:
17-
node-version: 16
17+
node-version: 22
1818

1919
- run: npm ci
2020
- run: npm test

admin/.eslintrc.js

Lines changed: 0 additions & 14 deletions
This file was deleted.

admin/eslint.config.js

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
const js = require("@eslint/js");
2+
const globals = require("globals");
3+
const prettier = require("eslint-plugin-prettier");
4+
const react = require("eslint-plugin-react");
5+
const reactHooks = require("eslint-plugin-react-hooks");
6+
const reactIntl = require("@calm/eslint-plugin-react-intl");
7+
const prettierConfig = require("eslint-config-prettier");
8+
9+
module.exports = [
10+
js.configs.recommended,
11+
prettierConfig,
12+
{
13+
ignores: ["**/node_modules/", "dist/", "*.min.js"]
14+
},
15+
{
16+
files: ["**/*.js", "**/*.jsx"],
17+
languageOptions: {
18+
ecmaVersion: "latest",
19+
sourceType: "module",
20+
parserOptions: {
21+
ecmaFeatures: {
22+
jsx: true
23+
}
24+
},
25+
globals: {
26+
...globals.browser,
27+
...globals.node,
28+
THREE: true,
29+
AFRAME: true,
30+
NAF: true,
31+
APP: true
32+
}
33+
},
34+
plugins: {
35+
prettier,
36+
react,
37+
"react-hooks": reactHooks,
38+
"@calm/react-intl": reactIntl
39+
},
40+
settings: {
41+
react: {
42+
version: "detect"
43+
}
44+
},
45+
rules: {
46+
"prettier/prettier": "error",
47+
"prefer-const": "error",
48+
"no-use-before-define": "error",
49+
"no-var": "error",
50+
"no-throw-literal": "error",
51+
"no-unused-vars": [
52+
"error",
53+
{
54+
destructuredArrayIgnorePattern: "^_"
55+
}
56+
],
57+
"no-console": "off",
58+
"react-hooks/rules-of-hooks": "error",
59+
"react-hooks/exhaustive-deps": "error",
60+
"react/prop-types": "error",
61+
"@calm/react-intl/missing-formatted-message": "error",
62+
"@calm/react-intl/missing-attribute": "error",
63+
"@calm/react-intl/missing-values": "error",
64+
// React recommended rules
65+
"react/display-name": "error",
66+
"react/jsx-key": "error",
67+
"react/jsx-no-comment-textnodes": "error",
68+
"react/jsx-no-duplicate-props": "error",
69+
"react/jsx-no-target-blank": "error",
70+
"react/jsx-no-undef": "error",
71+
"react/jsx-uses-react": "error",
72+
"react/jsx-uses-vars": "error",
73+
"react/no-children-prop": "error",
74+
"react/no-danger-with-children": "error",
75+
"react/no-deprecated": "error",
76+
"react/no-direct-mutation-state": "error",
77+
"react/no-find-dom-node": "error",
78+
"react/no-is-mounted": "error",
79+
"react/no-render-return-value": "error",
80+
"react/no-string-refs": "error",
81+
"react/no-unescaped-entities": "error",
82+
"react/no-unknown-property": "error",
83+
"react/no-unsafe": "off",
84+
"react/require-render-return": "error"
85+
}
86+
}
87+
];

0 commit comments

Comments
 (0)