-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: Update to eslint v9 #525
Merged
Merged
Changes from 3 commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
import { fixupConfigRules, fixupPluginRules } from "@eslint/compat"; | ||
import typescriptEslint from "@typescript-eslint/eslint-plugin"; | ||
import react from "eslint-plugin-react"; | ||
import jsxA11Y from "eslint-plugin-jsx-a11y"; | ||
import tsParser from "@typescript-eslint/parser"; | ||
import path from "node:path"; | ||
import { fileURLToPath } from "node:url"; | ||
import js from "@eslint/js"; | ||
import { FlatCompat } from "@eslint/eslintrc"; | ||
|
||
const __filename = fileURLToPath(import.meta.url); | ||
const __dirname = path.dirname(__filename); | ||
const compat = new FlatCompat({ | ||
baseDirectory: __dirname, | ||
recommendedConfig: js.configs.recommended, | ||
allConfig: js.configs.all | ||
}); | ||
|
||
export default [{ | ||
ignores: [ | ||
"**/webpack.config.js", | ||
"**/.eslintrc.js", | ||
"**/socket.js", | ||
"**/node_modules", | ||
"**/coverage", | ||
], | ||
}, ...fixupConfigRules(compat.extends( | ||
"eslint:recommended", | ||
"plugin:@typescript-eslint/recommended", | ||
"plugin:react/recommended", | ||
"plugin:jsx-a11y/recommended", | ||
"plugin:react-hooks/recommended", | ||
)), { | ||
plugins: { | ||
"@typescript-eslint": fixupPluginRules(typescriptEslint), | ||
react: fixupPluginRules(react), | ||
"jsx-a11y": fixupPluginRules(jsxA11Y), | ||
}, | ||
|
||
linterOptions: { | ||
reportUnusedDisableDirectives: true, | ||
}, | ||
|
||
languageOptions: { | ||
parser: tsParser, | ||
ecmaVersion: 5, | ||
sourceType: "script", | ||
|
||
parserOptions: { | ||
ecmaFeatures: { | ||
jsx: true, | ||
}, | ||
}, | ||
}, | ||
|
||
settings: { | ||
react: { | ||
version: "detect", | ||
}, | ||
}, | ||
|
||
rules: { | ||
"no-console": 0, | ||
"prefer-rest-params": "off", | ||
"@typescript-eslint/ban-ts-comment": "off", | ||
"@typescript-eslint/no-explicit-any": "off", | ||
|
||
"@typescript-eslint/no-unused-vars": ["error", { | ||
argsIgnorePattern: "^_.*", | ||
varsIgnorePattern: "^_.*", | ||
destructuredArrayIgnorePattern: "^_.*", | ||
}], | ||
|
||
"react/display-name": "off", | ||
|
||
"react/function-component-definition": ["error", { | ||
namedComponents: "arrow-function", | ||
unnamedComponents: "arrow-function", | ||
}], | ||
|
||
"react/no-danger": "error", | ||
"jsx-a11y/no-static-element-interactions": "off", | ||
"jsx-a11y/click-events-have-key-events": "off", | ||
}, | ||
}]; |
1 change: 0 additions & 1 deletion
1
assets/js/components/OutfrontTakeoverTool/AlertDashboard/PastAlertsList.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 0 additions & 1 deletion
1
assets/js/components/OutfrontTakeoverTool/AlertWizard/AlertWizard.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 0 additions & 1 deletion
1
assets/js/components/OutfrontTakeoverTool/AlertWizard/SVGPreviews.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
/* eslint-disable react/prop-types */ | ||
import React from "react"; | ||
|
||
import { | ||
|
1 change: 0 additions & 1 deletion
1
assets/js/components/OutfrontTakeoverTool/AlertWizard/WizardSidebar.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file seems to be 4-spaced, rather than our usual 2-spaced.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm yeah thank you. I guess the devs of the migrator tool are 4-spacers 😠