update eslint to omit blank line between members

This commit is contained in:
wancat committed 2024-02-06 09:31:20 +08:00
1 parent e91774fe3b
commit 2a542302bc
5 files changed
+21 -5

No files matched your search

+13
View File
@@ -40,6 +40,11 @@ module.exports = {
'prettier/prettier': ['error', { endOfLine: 'auto', semi: false }],
'import/prefer-default-export': 'off',
'no-restricted-syntax': ['off', 'ForOfStatement'],
'lines-between-class-members': [
'error',
'always',
{ exceptAfterSingleLine: true },
],
'@typescript-eslint/explicit-module-boundary-types': 'off',
@@ -55,4 +60,12 @@ module.exports = {
},
],
},
overrides: [
{
files: ['**/tests/**/*.js', '**/tests/**/*.ts'], // Adjust the pattern to match your test files
rules: {
'import/extensions': 'off', // Turn off the rule for test files
},
},
],
}
+1 -1
View File
@@ -29,7 +29,7 @@
"build:quests": "yarn workspace server build:quests"
},
"devDependencies": {
"@types/jest": "^29.5.11",
"@types/jest": "^29.5.12",
"@types/node": "^20.10.4",
"@typescript-eslint/eslint-plugin": "^6.14.0",
"@typescript-eslint/parser": "^6.14.0",
+3 -1
View File
@@ -53,7 +53,9 @@ export default class DAG {
if (node.layer !== undefined) {
return node.layer
}
const previousLayer = node.requirements.map((rId: string) => this.setLayer(rId))
const previousLayer = node.requirements.map((rId: string) =>
this.setLayer(rId)
)
node.layer = Math.max(...previousLayer, 0) + 1
if (this.layers.length < node.layer) {
this.layers.push(1)
+2 -1
View File
@@ -2,7 +2,8 @@
"extends": "../../tsconfig.json",
"compilerOptions": {
"rootDir": "src",
"outDir": "./dist"
"outDir": "./dist",
"allowJs": false
},
"include": ["src"],
"exclude": ["node_modules", "dist"]
+2 -2
View File
@@ -1460,7 +1460,7 @@ __metadata:
languageName: node
linkType: hard
"@types/jest@npm:^29.5.11":
"@types/jest@npm:^29.5.12":
version: 29.5.12
resolution: "@types/jest@npm:29.5.12"
dependencies:
@@ -6495,7 +6495,7 @@ __metadata:
version: 0.0.0-use.local
resolution: "linux-odyssey@workspace:."
dependencies:
"@types/jest": "npm:^29.5.11"
"@types/jest": "npm:^29.5.12"
"@types/node": "npm:^20.10.4"
"@typescript-eslint/eslint-plugin": "npm:^6.14.0"
"@typescript-eslint/parser": "npm:^6.14.0"