Client: add eslint and update tsconfig
This commit is contained in:
parent
ba14ceec9f
commit
9d5c66e872
10
packages/client/.eslintrc.cjs
Normal file
10
packages/client/.eslintrc.cjs
Normal file
@ -0,0 +1,10 @@
|
||||
module.exports = {
|
||||
extends: "../shared/.eslintrc.cjs",
|
||||
parserOptions: {
|
||||
project: "tsconfig.eslint.json",
|
||||
tsconfigRootDir: __dirname,
|
||||
sourceType: "module",
|
||||
},
|
||||
|
||||
ignorePatterns: ["./tsconfig.json", "coverage/**", "storybook-static/**"],
|
||||
};
|
@ -59,6 +59,7 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.21.3",
|
||||
"@babel/eslint-parser": "^7.21.8",
|
||||
"@babel/plugin-proposal-class-properties": "^7.18.6",
|
||||
"@babel/plugin-proposal-export-default-from": "^7.18.10",
|
||||
"@babel/plugin-transform-runtime": "^7.21.0",
|
||||
@ -66,10 +67,23 @@
|
||||
"@babel/preset-react": "^7.18.6",
|
||||
"@babel/preset-typescript": "^7.21.0",
|
||||
"@svgr/webpack": "^5.5.0",
|
||||
"@types/eslint": "^8.44.7",
|
||||
"@typescript-eslint/eslint-plugin": "^6.12.0",
|
||||
"@typescript-eslint/parser": "^6.12.0",
|
||||
"babel-loader": "^8.3.0",
|
||||
"clean-webpack-plugin": "^4.0.0",
|
||||
"copy-webpack-plugin": "^9.1.0",
|
||||
"css-loader": "^6.7.3",
|
||||
"eslint": "^8.54.0",
|
||||
"eslint-config-airbnb": "^19.0.4",
|
||||
"eslint-config-airbnb-typescript": "^17.1.0",
|
||||
"eslint-config-prettier": "^9.0.0",
|
||||
"eslint-plugin-import": "^2.29.0",
|
||||
"eslint-plugin-jsx-a11y": "^6.8.0",
|
||||
"eslint-plugin-prettier": "^5.0.1",
|
||||
"eslint-plugin-react": "^7.33.2",
|
||||
"eslint-plugin-react-hooks": "^4.6.0",
|
||||
"eslint-plugin-storybook": "^0.6.15",
|
||||
"external-remotes-plugin": "^1.0.0",
|
||||
"file-loader": "^6.2.0",
|
||||
"html-loader": "^4.2.0",
|
||||
|
17
packages/client/tsconfig.eslint.json
Normal file
17
packages/client/tsconfig.eslint.json
Normal file
@ -0,0 +1,17 @@
|
||||
{
|
||||
"extends": "./tsconfig.json",
|
||||
"include": [
|
||||
// 👇️ add all the directories and files
|
||||
// that you want to lint here
|
||||
"src",
|
||||
// add all files in which you see
|
||||
// the "parserOptions.project" error
|
||||
".eslintrc.cjs",
|
||||
"__mocks__",
|
||||
"jest.config.ts",
|
||||
".storybook",
|
||||
"babel.config.ts",
|
||||
"index.d.ts",
|
||||
"tsconfig.eslint.json"
|
||||
]
|
||||
}
|
@ -1,21 +1,12 @@
|
||||
{
|
||||
"extends": "../shared/tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "./dist/",
|
||||
"target": "es2016",
|
||||
"jsx": "react-jsx",
|
||||
"module": "ESNext",
|
||||
"rootDir": "./",
|
||||
"baseUrl": "./",
|
||||
"moduleResolution": "node",
|
||||
|
||||
"strict": true,
|
||||
"resolveJsonModule": true,
|
||||
"esModuleInterop": true,
|
||||
"skipLibCheck": true,
|
||||
"allowJs": true,
|
||||
"paths": {
|
||||
"PUBLIC_DIR": ["../../public"],
|
||||
"COMMON_DIR": ["../common"],
|
||||
"SRC_DIR": ["./src"]
|
||||
}
|
||||
}
|
||||
"SRC_DIR": ["./src"],
|
||||
},
|
||||
},
|
||||
}
|
||||
|
@ -169,4 +169,3 @@
|
||||
"react-dom": "^18.2.0"
|
||||
}
|
||||
}
|
||||
|
||||
|
14
yarn.lock
14
yarn.lock
@ -2958,6 +2958,7 @@ __metadata:
|
||||
resolution: "@docspace/client@workspace:packages/client"
|
||||
dependencies:
|
||||
"@babel/core": "npm:^7.21.3"
|
||||
"@babel/eslint-parser": "npm:^7.21.8"
|
||||
"@babel/plugin-proposal-class-properties": "npm:^7.18.6"
|
||||
"@babel/plugin-proposal-export-default-from": "npm:^7.18.10"
|
||||
"@babel/plugin-transform-runtime": "npm:^7.21.0"
|
||||
@ -2965,12 +2966,25 @@ __metadata:
|
||||
"@babel/preset-react": "npm:^7.18.6"
|
||||
"@babel/preset-typescript": "npm:^7.21.0"
|
||||
"@svgr/webpack": "npm:^5.5.0"
|
||||
"@types/eslint": "npm:^8.44.7"
|
||||
"@typescript-eslint/eslint-plugin": "npm:^6.12.0"
|
||||
"@typescript-eslint/parser": "npm:^6.12.0"
|
||||
babel-loader: "npm:^8.3.0"
|
||||
clean-webpack-plugin: "npm:^4.0.0"
|
||||
copy-to-clipboard: "npm:^3.3.3"
|
||||
copy-webpack-plugin: "npm:^9.1.0"
|
||||
css-loader: "npm:^6.7.3"
|
||||
element-resize-detector: "npm:^1.2.4"
|
||||
eslint: "npm:^8.54.0"
|
||||
eslint-config-airbnb: "npm:^19.0.4"
|
||||
eslint-config-airbnb-typescript: "npm:^17.1.0"
|
||||
eslint-config-prettier: "npm:^9.0.0"
|
||||
eslint-plugin-import: "npm:^2.29.0"
|
||||
eslint-plugin-jsx-a11y: "npm:^6.8.0"
|
||||
eslint-plugin-prettier: "npm:^5.0.1"
|
||||
eslint-plugin-react: "npm:^7.33.2"
|
||||
eslint-plugin-react-hooks: "npm:^4.6.0"
|
||||
eslint-plugin-storybook: "npm:^0.6.15"
|
||||
external-remotes-plugin: "npm:^1.0.0"
|
||||
file-loader: "npm:^6.2.0"
|
||||
file-saver: "npm:^2.0.5"
|
||||
|
Loading…
Reference in New Issue
Block a user