Skip to content

Commit

Permalink
chore: lint with sxzz config
Browse files Browse the repository at this point in the history
Signed-off-by: Innei <i@innei.in>
  • Loading branch information
Innei committed Apr 29, 2024
1 parent 2cbfb9c commit 1a63ad2
Show file tree
Hide file tree
Showing 39 changed files with 901 additions and 799 deletions.
27 changes: 0 additions & 27 deletions .eslintrc.js

This file was deleted.

1 change: 1 addition & 0 deletions .prettierrc.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { factory } from '@innei/prettier'
export default {
...factory({
tailwindcss: false,
importSort: false,
}),
importOrderParserPlugins: ['typescript', 'jsx', 'decorators-legacy'],
}
53 changes: 53 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
import { sxzz } from '@sxzz/eslint-config'

export default sxzz(
[
{
languageOptions: {
parserOptions: {
emitDecoratorMetadata: true,
experimentalDecorators: true,
},
},
rules: {
eqeqeq: 'off',

'no-void': 0,
'@typescript-eslint/consistent-type-imports': 'warn',
'@typescript-eslint/consistent-type-assertions': 0,
'no-restricted-syntax': 0,
'unicorn/filename-case': 0,
'unicorn/prefer-math-trunc': 0,

'unused-imports/no-unused-vars': [
'error',
{
vars: 'all',
varsIgnorePattern: '^_',
args: 'after-used',
argsIgnorePattern: '^_',
ignoreRestSiblings: true,
},
],

// for node server runtime
'require-await': 0,
'unicorn/no-array-callback-reference': 0,

'node/prefer-global/process': 0,
'node/prefer-global/buffer': 'off',
'no-duplicate-imports': 'off',
'unicorn/explicit-length-check': 0,
// readable push syntax
'unicorn/no-array-push-push': 0,
'unicorn/prefer-top-level-await': 0,
},
},
],
{
prettier: true,
markdown: true,
vue: false, // auto detection
unocss: false, // auto detection
},
)
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
"test": "pnpm run build:external && vitest"
},
"dependencies": {
"@nest-http/external": "workspace:*",
"@nestjs/cache-manager": "2.2.1",
"@nestjs/common": "10.3.3",
"@nestjs/core": "10.3.3",
Expand Down Expand Up @@ -70,18 +71,17 @@
"redis": "4.6.13",
"reflect-metadata": "0.2.1",
"rxjs": "7.8.1",
"snakecase-keys": "6.0.0",
"@nest-http/external": "workspace:*"
"snakecase-keys": "6.0.0"
},
"devDependencies": {
"@innei/bump-version": "^1.5.10",
"@innei/eslint-config-ts": "^0.12.2",
"@innei/prettier": "^0.12.2",
"@nestjs/cli": "10.3.2",
"@nestjs/schematics": "10.1.1",
"@nestjs/testing": "10.3.3",
"@swc/cli": "0.3.9",
"@swc/core": "1.4.2",
"@sxzz/eslint-config": "3.9.1",
"@types/bcryptjs": "2.4.6",
"@types/cache-manager": "4.0.6",
"@types/lodash": "4.14.202",
Expand All @@ -91,7 +91,7 @@
"@types/ua-parser-js": "0.7.39",
"@vercel/ncc": "0.38.1",
"cross-env": "7.0.3",
"eslint": "^8.57.0",
"eslint": "^9",
"husky": "9.0.11",
"ioredis": "^5.3.2",
"lint-staged": "15.2.2",
Expand All @@ -101,13 +101,13 @@
"source-map-support": "*",
"ts-loader": "9.5.1",
"tsconfig-paths": "4.2.0",
"tsup": "8.0.2",
"typescript": "^5.3.3",
"unplugin-swc": "1.4.4",
"vite": "5.1.4",
"vite-tsconfig-paths": "4.2.2",
"vitest": "0.34.6",
"zx": "7.2.3",
"tsup": "8.0.2"
"zx": "7.2.3"
},
"optionalDependencies": {
"mongodb-memory-server": "9.1.6",
Expand Down

0 comments on commit 1a63ad2

Please sign in to comment.