Files
freeCodeCamp/.eslintrc.json
T
Oliver Eyton-Williams 7216ca55cc refactor: organise TypeScript config and migrate helpers (#44747)
* feat: allow more 1000 steps to be created at once

* refactor: start migrating to typescript

* refactor: delete-step to ts

* refactor: migrated some helpers

* refactor: migrate create-empty-steps

* refactor: migrate create-step-between

* refactor: finish migrating to TS

* refactor: migrate tests

* fix: ensure mock.restore is done after each test

* fix: prevent double-tscing

* fix: repair the tests

* chore: use ts-node for scripts

We don't need the performance boost of incremental compilation and
ts-node is easier to work with

* refactor: consolidate tsconfigs

* refactor: replace gulp

* fix: use ts-node for build-curriculum

* fix: allow ts compilation of config

* feat: create and use create:config script

* fix: add /config to eslint projects

* fix: remove gulp script
2022-01-25 11:34:16 +01:00

120 lines
2.8 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"
],
"globals": {
"Promise": true,
"window": true,
"$": true,
"ga": true,
"jQuery": true,
"router": true
},
"settings": {
"react": {
"version": "16.4.2"
}
},
"rules": {
"import/named": 2,
"import/no-named-as-default": 0,
"import/no-named-as-default-member": 0,
"import/order": 2
},
"overrides": [
{
"files": ["**/*.ts?(x)"],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": [
"./tsconfig.json",
"./config/tsconfig.json",
"./tools/ui-components/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": "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
}
}
]
}