Skip to content

Commit

Permalink
Revert "Migrating from eslintrc.json to eslint.config.js (#2660)"
Browse files Browse the repository at this point in the history
This reverts commit 1104967.
  • Loading branch information
palisadoes authored Jan 5, 2025
1 parent 97cb069 commit d6e0b49
Show file tree
Hide file tree
Showing 11 changed files with 1,916 additions and 442 deletions.
8 changes: 8 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Contains the PDF file of the Tag as JSON string, thus does not need to be linted

Check warning on line 1 in .eslintignore

View workflow job for this annotation

GitHub Actions / Performs linting, formatting, type-checking, checking for different source and target branch

File ignored by default.
src/components/CheckIn/tagTemplate.ts
package.json
package-lock.json
tsconfig.json

# Ignore the Docusaurus website subdirectory
docs/**
157 changes: 157 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,157 @@
{

Check warning on line 1 in .eslintrc.json

View workflow job for this annotation

GitHub Actions / Performs linting, formatting, type-checking, checking for different source and target branch

File ignored by default.
"env": {
"browser": true,
"node": true,
"es6": true
},

"extends": [
"plugin:react/recommended",
"eslint:recommended",
"plugin:jest/recommended",
"plugin:prettier/recommended",
"plugin:@typescript-eslint/recommended",
"eslint-config-prettier",
"prettier"
],
"globals": {
"Atomics": "readonly",
"SharedArrayBuffer": "readonly"
},
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": 2018,
"sourceType": "module"
},

"plugins": [
"react",
"@typescript-eslint",
"jest",
"import",
"eslint-plugin-tsdoc",
"prettier"
],
"rules": {
"react/destructuring-assignment": "error",
"@typescript-eslint/explicit-module-boundary-types": "error",
"react/no-multi-comp": [
"error",
{
"ignoreStateless": false
}
],
"react/jsx-filename-extension": [
"error",
{
"extensions": [".tsx"]
}
],
"import/no-duplicates": "error",
"tsdoc/syntax": "error",
"@typescript-eslint/ban-ts-comment": "error",
"@typescript-eslint/no-unused-vars": "error",
"@typescript-eslint/no-explicit-any": "error",
"@typescript-eslint/no-inferrable-types": "error",
"@typescript-eslint/no-non-null-asserted-optional-chain": "error",
"@typescript-eslint/no-non-null-assertion": "error",
"@typescript-eslint/no-var-requires": "error",
"@typescript-eslint/no-unsafe-function-type": "error",
"@typescript-eslint/no-wrapper-object-types": "error",
"@typescript-eslint/no-empty-object-type": "error",
"@typescript-eslint/no-duplicate-enum-values": "error",
"@typescript-eslint/array-type": "error",
"@typescript-eslint/consistent-type-assertions": "error",
"@typescript-eslint/consistent-type-imports": "error",
"@typescript-eslint/explicit-function-return-type": [
2,
{
"allowExpressions": true,
"allowTypedFunctionExpressions": true
}
],
"camelcase": "off",
"@typescript-eslint/naming-convention": [
"error",

{
"selector": "interface",
"format": ["PascalCase"],
"prefix": ["Interface", "TestInterface"]
},

{
"selector": ["typeAlias", "typeLike", "enum"],
"format": ["PascalCase"]
},
{
"selector": "typeParameter",
"format": ["PascalCase"],
"prefix": ["T"]
},
{
"selector": "variable",
"format": ["camelCase", "UPPER_CASE", "PascalCase"],
"leadingUnderscore": "allow"
},
{
"selector": "parameter",
"format": ["camelCase"],
"leadingUnderscore": "allow"
},
{
"selector": "function",
"format": ["camelCase", "PascalCase"]
},
{
"selector": "memberLike",
"modifiers": ["private"],
"format": ["camelCase"],
"leadingUnderscore": "require"
},

{
"selector": "variable",
"modifiers": ["exported"],
"format": null
}
],

"react/jsx-pascal-case": [
"error",
{ "allowAllCaps": false, "allowNamespace": false }
],

"react/jsx-equals-spacing": ["warn", "never"],
"react/no-this-in-sfc": "error",

"jest/expect-expect": 0,

"react/no-unstable-nested-components": ["error", { "allowAsProps": true }],
"react/function-component-definition": [
0,
{ "namedComponents": "function-declaration" }
],
"prettier/prettier": "error"
},

"settings": {
"react": {
"version": "detect"
}
},
"ignorePatterns": [
"**/*.css",
"**/*.scss",
"**/*.less",
"**/*.json",
"**/*.svg",
"docs/docusaurus.config.ts",
"docs/sidebars.ts",
"docs/src/**",
"docs/blog/**"
]
}
216 changes: 0 additions & 216 deletions eslint.config.mjs

This file was deleted.

Loading

0 comments on commit d6e0b49

Please sign in to comment.