forked from canonical/ubuntu.com
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
upgrade versions and fix linters (partially)
Co-authored-by: Min Kim <[email protected]>
- Loading branch information
1 parent
4258141
commit 33e1044
Showing
10 changed files
with
777 additions
and
354 deletions.
There are no files selected for viewing
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
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,74 @@ | ||
/** @type {import('eslint').Linter.FlatConfig[]} */ | ||
import eslint from "@eslint/js"; | ||
import reactPlugin from "eslint-plugin-react"; | ||
import tsParser from '@typescript-eslint/parser' | ||
import tseslint from 'typescript-eslint'; | ||
|
||
import globals from "globals"; | ||
|
||
const config = [ | ||
eslint.configs.recommended.rules, | ||
reactPlugin.configs.flat.recommended, | ||
...tseslint.configs.recommended, | ||
{ | ||
// env: { | ||
// node: true, | ||
// browser: true, | ||
// es6: true, | ||
// jest: true, | ||
// }, | ||
// extends: [ | ||
// "eslint:recommended", | ||
// "plugin:react/recommended", | ||
// "plugin:@typescript-eslint/recommended", | ||
// ], | ||
languageOptions: { | ||
...reactPlugin.configs.flat.recommended.languageOptions, | ||
globals: { | ||
Atomics: "readonly", | ||
SharedArrayBuffer: "readonly", | ||
dataLayer: "readonly", | ||
d3: "readonly", | ||
topojson: "readonly", | ||
ga: "readonly", | ||
grecaptcha: "readonly", | ||
serialize: "readonly", | ||
...globals.node, | ||
...globals.browser, | ||
...globals.jest, | ||
...globals.es2022 | ||
}, | ||
parser: tsParser, | ||
parserOptions: { | ||
ecmaVersion: 2018, | ||
sourceType: "module", | ||
project: "./tsconfig.json", | ||
ecmaFeatures: { | ||
jsx: true | ||
} | ||
}, | ||
}, | ||
// rules: { | ||
// semi: ["error", "always"], | ||
// "@typescript-eslint/explicit-module-boundary-types": "off", | ||
// "@typescript-eslint/no-empty-function": "off", | ||
// "@typescript-eslint/no-this-alias": "off", | ||
// "@typescript-eslint/no-var-requires": "off", | ||
// "@typescript-eslint/no-unused-vars": "off", | ||
// "no-prototype-builtins": "off", | ||
// }, | ||
files: ["**/*.tsx"], | ||
rules: { | ||
semi: ["error", "always"], | ||
"react/prop-types": "off", | ||
"@typescript-eslint/explicit-module-boundary-types": "off", | ||
"@typescript-eslint/no-empty-function": "off", | ||
"@typescript-eslint/no-this-alias": "off", | ||
"@typescript-eslint/no-var-requires": "off", | ||
"@typescript-eslint/no-unused-vars": "off", | ||
"no-prototype-builtins": "off", | ||
}, | ||
}, | ||
]; | ||
|
||
export default config; |
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
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
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
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
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
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.