Skip to content

Commit

Permalink
chore: remove eslint-config-prettier & eslint-plugin-prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
Flower-F committed Nov 19, 2023
1 parent e7ed45e commit 6d912b5
Show file tree
Hide file tree
Showing 6 changed files with 250 additions and 425 deletions.
13 changes: 4 additions & 9 deletions .eslintrc.cjs
@@ -1,6 +1,5 @@
const { defineConfig } = require('eslint-define-config');

const options = defineConfig({
/** @type {import('eslint'.Linter.Config)} */
module.exports = {
env: {
browser: true,
es2021: true,
Expand All @@ -10,8 +9,6 @@ const options = defineConfig({
'eslint:recommended',
'plugin:react/recommended',
'plugin:@typescript-eslint/recommended',
'prettier',
'plugin:prettier/recommended',
],
parser: '@typescript-eslint/parser',
parserOptions: {
Expand All @@ -21,7 +18,7 @@ const options = defineConfig({
ecmaVersion: 'latest',
sourceType: 'module',
},
plugins: ['react', 'react-hooks', '@typescript-eslint', 'prettier'],
plugins: ['react', 'react-hooks', '@typescript-eslint'],
rules: {
'react/react-in-jsx-scope': 'off',
'@typescript-eslint/no-var-requires': 'off',
Expand All @@ -31,6 +28,4 @@ const options = defineConfig({
version: 'detect',
},
},
});

module.exports = options;
};
2 changes: 1 addition & 1 deletion .lintstagedrc.cjs
@@ -1,4 +1,4 @@
module.exports = {
'**/*.{js,jsx,tsx,ts}': ['eslint --fix'],
'**/*.{js,jsx,tsx,ts}': ['eslint --fix', 'prettier --write'],
'**/*.{css,scss}': ['stylelint --fix'],
};
10 changes: 10 additions & 0 deletions .prettierignore
@@ -0,0 +1,10 @@
*.css
*.scss
*.d.ts
node_modules
dist
coverage
public
*.d.ts
stats.html
*.md
1 change: 0 additions & 1 deletion .prettierrc.cjs
Expand Up @@ -3,5 +3,4 @@ module.exports = {
printWidth: 120,
singleQuote: true,
jsxSingleQuote: true,
trailingComma: 'all',
};
18 changes: 8 additions & 10 deletions package.json
Expand Up @@ -2,7 +2,7 @@
"name": "revitesse-lite",
"private": true,
"version": "0.0.0",
"packageManager": "pnpm@8.10.2",
"packageManager": "pnpm@8.10.5",
"type": "module",
"scripts": {
"dev": "vite",
Expand All @@ -11,13 +11,14 @@
"eslint": "eslint --ext .js,.jsx,.ts,.tsx --cache --fix --quiet ./",
"stylelint": "stylelint --fix --cache src/**/*.{scss,css}",
"lint": "pnpm eslint && pnpm stylelint",
"format": "npx prettier --write ./src",
"prepare": "husky install",
"test": "vitest",
"coverage": "vitest run --coverage",
"typecheck": "tsc"
},
"dependencies": {
"@unocss/reset": "0.57.4",
"@unocss/reset": "0.57.5",
"ahooks": "^3.7.8",
"react": "^18.2.0",
"react-dom": "^18.2.0",
Expand All @@ -27,8 +28,8 @@
"@commitlint/cli": "^18.4.2",
"@commitlint/config-conventional": "^18.4.2",
"@iconify-json/carbon": "^1.1.21",
"@testing-library/react": "^14.1.0",
"@types/node": "^20.9.1",
"@testing-library/react": "^14.1.2",
"@types/node": "^20.9.2",
"@types/react": "^18.2.37",
"@types/react-dom": "^18.2.15",
"@typescript-eslint/eslint-plugin": "^6.11.0",
Expand All @@ -37,11 +38,8 @@
"@vitejs/plugin-react-swc": "^3.5.0",
"@vitest/coverage-v8": "^0.34.6",
"commitlint": "^18.4.2",
"eslint": "^8.53.0",
"eslint-config-prettier": "^9.0.0",
"eslint-define-config": "^1.24.1",
"eslint": "^8.54.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",
"husky": "^8.0.3",
Expand All @@ -56,10 +54,10 @@
"stylelint-config-standard-scss": "^11.1.0",
"terser": "^5.24.0",
"typescript": "^5.2.2",
"unocss": "0.57.4",
"unocss": "0.57.5",
"unplugin-auto-import": "^0.16.7",
"vite": "5.0.0",
"vite-plugin-pages": "^0.31.0",
"vitest": "0.34.6"
}
}
}

0 comments on commit 6d912b5

Please sign in to comment.