Skip to content

Commit

Permalink
chore(lint): added eslint npm scripts for linting
Browse files Browse the repository at this point in the history
  • Loading branch information
powerfooI committed Apr 9, 2024
1 parent 50c3a83 commit 149a73c
Show file tree
Hide file tree
Showing 4 changed files with 949 additions and 10 deletions.
3 changes: 0 additions & 3 deletions ui/.eslintrc.js

This file was deleted.

15 changes: 15 additions & 0 deletions ui/eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import pluginJs from '@eslint/js';
import react from 'eslint-plugin-react';
import globals from 'globals';
import tseslint from 'typescript-eslint';

export default [
{ languageOptions: { globals: globals.browser } },
pluginJs.configs.recommended,
...tseslint.configs.recommended,
{
plugins: {
pluginReactConfig: react,
}
},
];
14 changes: 10 additions & 4 deletions ui/package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
{
"private": true,
"type": "module",
"scripts": {
"dev": "max dev",
"build": "max build",
"format": "prettier --cache --write .",
"postinstall": "max setup",
"setup": "max setup",
"start": "npm run dev"
"start": "npm run dev",
"lint": "eslint src"
},
"dependencies": {
"@ant-design/icons": "^5.0.1",
Expand All @@ -26,14 +28,18 @@
"moment": "^2.29.4"
},
"devDependencies": {
"@eslint/js": "^9.0.0",
"@types/lodash": "^4.14.197",
"@types/react": "^18.0.33",
"@types/react-dom": "^18.0.11",
"eslint": "^9.0.0",
"eslint-plugin-react": "^7.34.1",
"globals": "^15.0.0",
"lint-staged": "^13.2.0",
"prettier": "^2.8.7",
"prettier-plugin-organize-imports": "^3.2.2",
"prettier-plugin-packagejson": "^2.4.3",
"typescript": "^5.0.3"
},
"repository": "[email protected]:oceanbase/oceanbase-dashboard.git"
"typescript": "^5.0.3",
"typescript-eslint": "^7.6.0"
}
}
Loading

0 comments on commit 149a73c

Please sign in to comment.