Skip to content
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions .eslintignore

This file was deleted.

66 changes: 0 additions & 66 deletions .eslintrc.js

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/test-and-deploy-storybook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:

- uses: actions/setup-node@v3
with:
node-version: 16
node-version: 22

- run: npm ci
- run: npm test
Expand Down
14 changes: 0 additions & 14 deletions admin/.eslintrc.js

This file was deleted.

87 changes: 87 additions & 0 deletions admin/eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
const js = require("@eslint/js");
const globals = require("globals");
const prettier = require("eslint-plugin-prettier");
const react = require("eslint-plugin-react");
const reactHooks = require("eslint-plugin-react-hooks");
const reactIntl = require("@calm/eslint-plugin-react-intl");
const prettierConfig = require("eslint-config-prettier");

module.exports = [
js.configs.recommended,
prettierConfig,
{
ignores: ["**/node_modules/", "dist/", "*.min.js"]
},
{
files: ["**/*.js", "**/*.jsx"],
languageOptions: {
ecmaVersion: "latest",
sourceType: "module",
parserOptions: {
ecmaFeatures: {
jsx: true
}
},
globals: {
...globals.browser,
...globals.node,
THREE: true,
AFRAME: true,
NAF: true,
APP: true
}
},
plugins: {
prettier,
react,
"react-hooks": reactHooks,
"@calm/react-intl": reactIntl
},
settings: {
react: {
version: "detect"
}
},
rules: {
"prettier/prettier": "error",
"prefer-const": "error",
"no-use-before-define": "error",
"no-var": "error",
"no-throw-literal": "error",
"no-unused-vars": [
"error",
{
destructuredArrayIgnorePattern: "^_"
}
],
"no-console": "off",
"react-hooks/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": "error",
"react/prop-types": "error",
"@calm/react-intl/missing-formatted-message": "error",
"@calm/react-intl/missing-attribute": "error",
"@calm/react-intl/missing-values": "error",
// React recommended rules
"react/display-name": "error",
"react/jsx-key": "error",
"react/jsx-no-comment-textnodes": "error",
"react/jsx-no-duplicate-props": "error",
"react/jsx-no-target-blank": "error",
"react/jsx-no-undef": "error",
"react/jsx-uses-react": "error",
"react/jsx-uses-vars": "error",
"react/no-children-prop": "error",
"react/no-danger-with-children": "error",
"react/no-deprecated": "error",
"react/no-direct-mutation-state": "error",
"react/no-find-dom-node": "error",
"react/no-is-mounted": "error",
"react/no-render-return-value": "error",
"react/no-string-refs": "error",
"react/no-unescaped-entities": "error",
"react/no-unknown-property": "error",
"react/no-unsafe": "off",
"react/require-render-return": "error"
}
}
];
Loading