mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-10-29 18:54:34 +08:00
* fix: circular dependency in formHelpers * fix: circular dependency in Flash * fix: circular dependency in helpers * fix: circular dependency in current-challenge-saga (1/2) * fix: circular dependency in code-lock-epic * feat: eslint rule for circular dependencies * fix: circular dependency in tools * fix: import error and more circular dependencies in formHelpers * fix prettier error * fix: circular dependency in danger-zone-saga * fix: circular dependency in update-email-saga * fix: circular dependency in settings-saga * fix: circular dependency in accept-terms-saga * fix: circular dependency in codeally-saga TODO: make a separate file for selectors * fix: ci lint error * fix: ci lint:prettier error * fix: circular dependency in current-challenge-saga * fix: cricular dependency in Challenges/redux * fix: circular dependency in redux/settings * fix: circular dependency in root redux * fix: lint errors * chore: remove unecessary comment * chore: remove unused export * fix: clear out actions and selectors * revert changes to package.json * test ci with maxDepth of 1 * fix: fallback to empty object * test action if it will run for maxDepth of 2
144 lines
3.5 KiB
JSON
144 lines
3.5 KiB
JSON
{
|
|
"env": {
|
|
"es6": true,
|
|
"browser": true,
|
|
"mocha": true,
|
|
"node": true,
|
|
"jest": true
|
|
},
|
|
"parser": "babel-eslint",
|
|
"root": true,
|
|
"extends": [
|
|
"eslint:recommended",
|
|
"plugin:react/recommended",
|
|
"plugin:react-hooks/recommended",
|
|
"plugin:import/recommended",
|
|
"plugin:import/typescript",
|
|
"plugin:jsx-a11y/recommended",
|
|
"prettier"
|
|
],
|
|
"plugins": ["no-only-tests"],
|
|
"globals": {
|
|
"Promise": true,
|
|
"window": true,
|
|
"$": true,
|
|
"ga": true,
|
|
"jQuery": true,
|
|
"router": true
|
|
},
|
|
"settings": {
|
|
"react": {
|
|
"version": "16.4.2"
|
|
}
|
|
},
|
|
"rules": {
|
|
"import/named": "error",
|
|
"import/no-named-as-default": "off",
|
|
"import/no-named-as-default-member": "off",
|
|
"import/order": "error",
|
|
"import/no-cycle": [2, { "maxDepth": 2 }],
|
|
"react/prop-types": "off",
|
|
"no-only-tests/no-only-tests": "error"
|
|
},
|
|
"overrides": [
|
|
{
|
|
"files": ["**/*.ts?(x)"],
|
|
"parser": "@typescript-eslint/parser",
|
|
"parserOptions": {
|
|
"project": [
|
|
"./tsconfig.json",
|
|
"./config/tsconfig.json",
|
|
"./tools/ui-components/tsconfig.json",
|
|
"./utils/tsconfig.json",
|
|
"./web/tsconfig.json",
|
|
"./curriculum-server/tsconfig.json"
|
|
]
|
|
},
|
|
"extends": [
|
|
"plugin:@typescript-eslint/recommended",
|
|
"plugin:@typescript-eslint/recommended-requiring-type-checking"
|
|
],
|
|
"plugins": ["@typescript-eslint"],
|
|
"rules": {
|
|
"import/named": 0,
|
|
"@typescript-eslint/naming-convention": [
|
|
"error",
|
|
{
|
|
"selector": "default",
|
|
"format": ["camelCase"],
|
|
"leadingUnderscore": "allow",
|
|
"trailingUnderscore": "allow"
|
|
},
|
|
{
|
|
"selector": [
|
|
"classProperty",
|
|
"objectLiteralProperty",
|
|
"typeProperty",
|
|
"classMethod",
|
|
"objectLiteralMethod",
|
|
"typeMethod",
|
|
"accessor",
|
|
"enumMember"
|
|
],
|
|
"format": null,
|
|
"modifiers": ["requiresQuotes"]
|
|
},
|
|
{
|
|
"selector": "variable",
|
|
"format": ["camelCase", "UPPER_CASE", "PascalCase"],
|
|
"leadingUnderscore": "allowSingleOrDouble",
|
|
"trailingUnderscore": "allow"
|
|
},
|
|
{
|
|
"selector": "typeLike",
|
|
"format": ["PascalCase"],
|
|
"custom": {
|
|
"regex": "^I[A-Z]|[a-zA-Z]Type$",
|
|
"match": false
|
|
}
|
|
},
|
|
{
|
|
"selector": "typeProperty",
|
|
"format": ["camelCase", "PascalCase"]
|
|
},
|
|
{
|
|
"selector": "objectLiteralProperty",
|
|
"format": ["camelCase", "PascalCase"],
|
|
"leadingUnderscore": "allowSingleOrDouble"
|
|
},
|
|
{
|
|
"selector": "function",
|
|
"format": ["camelCase", "PascalCase"]
|
|
},
|
|
{
|
|
"selector": "enumMember",
|
|
"format": ["PascalCase"]
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"files": [
|
|
"./tools/ui-components/**/*.test.[jt]s?(x)",
|
|
"./client/**/*.test.[jt]s?(x)"
|
|
],
|
|
"extends": [
|
|
"plugin:testing-library/react",
|
|
"plugin:jest-dom/recommended"
|
|
],
|
|
"rules": { "import/named": 2 }
|
|
},
|
|
{
|
|
"files": ["cypress/**/*.js"],
|
|
"globals": {
|
|
"cy": true,
|
|
"Cypress": true
|
|
}
|
|
},
|
|
{
|
|
"files": ["web/**/*.tsx"],
|
|
"extends": ["plugin:react/jsx-runtime"]
|
|
}
|
|
]
|
|
}
|