Skip to content

Commit

Permalink
Roll back React changes for this PR
Browse files Browse the repository at this point in the history
  • Loading branch information
AaronMoat committed Aug 20, 2024
1 parent 1c66a05 commit 002ad3b
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 44 deletions.
10 changes: 0 additions & 10 deletions .changeset/gorgeous-clocks-remain.md

This file was deleted.

17 changes: 2 additions & 15 deletions base.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ const tsParser = require('@typescript-eslint/parser');
const jestPlugin = require('eslint-plugin-jest');
const cypress = require('eslint-plugin-cypress');
const js = require('@eslint/js');
const unusedImports = require('eslint-plugin-unused-imports');

const { FlatCompat } = require('@eslint/eslintrc');

Expand Down Expand Up @@ -65,15 +64,10 @@ const baseRules = {
'no-label-var': ERROR,
'no-shadow': ERROR,
'no-undef-init': ERROR,

// Use unused-imports instead of no-unused-vars for autofix support
'no-unused-vars': OFF,
'unused-imports/no-unused-imports': ERROR,
'unused-imports/no-unused-vars': [
'no-unused-vars': [
ERROR,
{ argsIgnorePattern: '^_', ignoreRestSiblings: true },
],

'handle-callback-err': ERROR,
'no-new-require': ERROR,
'no-path-concat': ERROR,
Expand Down Expand Up @@ -114,7 +108,6 @@ module.exports = [
{
plugins: {
'import-x': importX,
'unused-imports': unusedImports,
},

languageOptions: {
Expand Down Expand Up @@ -156,21 +149,15 @@ module.exports = [
warnOnUnsupportedTypeScriptVersion: false,
},
},
plugins: { 'unused-imports': unusedImports },
settings,
rules: {
'@typescript-eslint/array-type': [ERROR, { default: 'array-simple' }],
'@typescript-eslint/consistent-type-definitions': OFF,
'@typescript-eslint/no-unused-expressions': ERROR,

// Use unused-imports instead of no-unused-vars for autofix support
'@typescript-eslint/no-unused-vars': [OFF],
'unused-imports/no-unused-imports': ERROR,
'unused-imports/no-unused-vars': [
'@typescript-eslint/no-unused-vars': [
ERROR,
{ argsIgnorePattern: '^_', ignoreRestSiblings: true },
],

'@typescript-eslint/no-use-before-define': OFF,
'@typescript-eslint/no-non-null-assertion': OFF,
'@typescript-eslint/ban-ts-comment': OFF,
Expand Down
15 changes: 15 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,19 @@ module.exports = [

rules: reactRules,
},
{
files: ['**/*.tsx'],

rules: {
// temporary override until everybody removes the React import
'@typescript-eslint/no-unused-vars': [
ERROR,
{
argsIgnorePattern: '^_',
ignoreRestSiblings: true,
varsIgnorePattern: '^React$',
},
],
},
},
];
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
"eslint-plugin-jest": "^28.7.0",
"eslint-plugin-react": "^7.35.0",
"eslint-plugin-react-hooks": "^4.6.2",
"eslint-plugin-unused-imports": "^4.1.3",
"find-root": "^1.1.0",
"globals": "^15.9.0"
},
Expand Down
18 changes: 0 additions & 18 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 002ad3b

Please sign in to comment.