Skip to content
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(deps): update typescript-eslint monorepo to v8 (major) #304

Merged
merged 13 commits into from
Nov 27, 2024
Merged
Show file tree
Hide file tree
Changes from 11 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 0 additions & 13 deletions .config/.eslintrc

This file was deleted.

4 changes: 3 additions & 1 deletion .config/webpack/webpack.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,9 @@ const config = async (env): Promise<Configuration> => ({
}),
new ESLintPlugin({
extensions: ['.ts', '.tsx'],
lintDirtyModulesOnly: Boolean(env.development), // don't lint on start, only lint changed files
configType: 'flat',
lintDirtyModulesOnly: Boolean(env.development),
overrideConfigFile: path.resolve(__dirname, '../../.eslintrc.cjs'),
}),
...(env.development ? [new LiveReloadPlugin()] : []),
],
Expand Down
3 changes: 0 additions & 3 deletions .eslintrc

This file was deleted.

42 changes: 42 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
const stylisticTs = require('@stylistic/eslint-plugin-ts');
const grafanaConfig = require("@grafana/eslint-config/flat");

module.exports = [{
ignores: [
".github",
".yarn",
"**/dist/",
"**/.config/",
".eslintrc.*",
".prettierrc.*"],
},
grafanaConfig,
{
rules: {
"react/prop-types": "off",
},
},
{
files: ["src/**/*.{ts,tsx}"],
plugins: {
'@stylistic/ts': stylisticTs
},
languageOptions: {
ecmaVersion: 5,
sourceType: "script",
parserOptions: {
project: "./tsconfig.json",
},
},
rules: {
"no-redeclare": ["warn", {
builtinGlobals: true
}],
},
},
{
files: ["./tests/**/*"],
rules: {
"react-hooks/rules-of-hooks": "off",
},
}];
20 changes: 11 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"dev": "webpack -w -c ./.config/webpack/webpack.config.ts --env development",
"e2e": "yarn cypress install && yarn grafana-e2e run",
"e2e:update": "yarn cypress install && yarn grafana-e2e run --update-screenshots",
"lint": "eslint --cache --ignore-path ./.gitignore --ext .js,.jsx,.ts,.tsx .",
"lint": "eslint --cache -c .eslintrc.cjs . ",
"lint:fix": "yarn lint --fix",
"prettier": "prettier --write \"src/**/*.{ts,tsx,js,json,css,md}\"",
"run-docker": "docker build -t cognite-grafana . && docker run --rm -it -p 3000:3000 cognite-grafana",
Expand All @@ -30,8 +30,10 @@
"@babel/core": "^7.16.7",
"@babel/preset-env": "^7.11.5",
"@grafana/e2e-selectors": "11.3.0",
"@grafana/eslint-config": "^6.0.0",
"@grafana/eslint-config": "^8.0.0",
"@grafana/tsconfig": "^2.0.0",
"@stylistic/eslint-plugin-migrate": "^2.11.0",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"@stylistic/eslint-plugin-migrate": "^2.11.0",

"@stylistic/eslint-plugin-ts": "^2.11.0",
"@swc/core": "^1.3.90",
"@swc/helpers": "^0.5.0",
"@swc/jest": "^0.2.26",
Expand All @@ -43,19 +45,19 @@
"@types/ms": "^0.7.31",
"@types/node": "^20.8.7",
"@types/react": "^18.0.0",
"@typescript-eslint/eslint-plugin": "^4.4.0",
"@typescript-eslint/parser": "^4.4.0",
"@typescript-eslint/eslint-plugin": "^8.15.0",
"@typescript-eslint/parser": "^8.15.0",
"copy-webpack-plugin": "^12.0.0",
"css-loader": "^7.0.0",
"eslint": "^7.10.0",
"eslint": "^9.0.0",
"eslint-config-airbnb-typescript": "^18.0.0",
"eslint-config-prettier": "^9.0.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-import": "^2.22.1",
"eslint-plugin-jsx-a11y": "^6.4.1",
"eslint-plugin-prettier": "^5.0.0",
"eslint-plugin-react": "^7.21.3",
"eslint-plugin-prettier": "^5.2.1",
"eslint-plugin-react": "^7.37.2",
"eslint-plugin-react-hooks": "^5.0.0",
"eslint-webpack-plugin": "^4.0.0",
"eslint-webpack-plugin": "^4.2.0",
"fork-ts-checker-webpack-plugin": "^9.0.0",
"glob": "^11.0.0",
"identity-obj-proxy": "3.0.0",
Expand Down
8 changes: 4 additions & 4 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -340,8 +340,8 @@ export class Ok<T, E> implements Result<T, E> {
this.value = v;
}

isOk: boolean = true;
isErr: boolean = false;
isOk = true;
isErr = false;
}

export class Err<T, E> implements Result<T, E> {
Expand All @@ -351,8 +351,8 @@ export class Err<T, E> implements Result<T, E> {
this.error = error;
}

isOk: boolean = false;
isErr: boolean = true;
isOk = false;
isErr = true;
}

export type Responses<T, U> = {
Expand Down
Loading
Loading