Skip to content

Commit e413973

Browse files
authored
chore: upgrade eslint config (#211)
1 parent 3453401 commit e413973

File tree

6 files changed

+993
-819
lines changed

6 files changed

+993
-819
lines changed

eslint-ci-rules.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[
2+
"@typescript-eslint/no-magic-numbers",
3+
"@stylistic/space-before-function-paren",
4+
"@typescript-eslint/no-empty-object-type",
5+
"@typescript-eslint/consistent-type-exports"
6+
]

eslint-ci.config.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
const ciRules = require('./eslint-ci-rules.json')
2+
3+
module.exports = (async function config() {
4+
const { default: defaultConfigPromise } = await import('./eslint.config.js')
5+
const defaultConfig = await defaultConfigPromise
6+
return [
7+
...defaultConfig,
8+
{
9+
files: ['**/*.ts', '**/*.tsx'],
10+
rules: ciRules.reduce((acc, rule) => ({ ...acc, [rule]: 'warn' }), {}),
11+
},
12+
]
13+
})()

eslint.config.js

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
1-
const txoConfig = require('eslint-config-txo-typescript')
2-
3-
/** @type {import('eslint').Linter.FlatConfig[]} */
4-
const config = [
5-
...txoConfig.default,
6-
]
7-
8-
module.exports = config
1+
module.exports = (async function config() {
2+
const txoPackageConfigList = await import('eslint-config-txo-package-typescript')
3+
return txoPackageConfigList.configList
4+
})()

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
"sanity": "yarn lint:ci && yarn build && tsc --noEmit && yarn test --coverage && yarn compare-boilerplate-version && echo 'success'",
3333
"semantic-release": "semantic-release",
3434
"update-boilerplate-version": "./scripts/update-boilerplate-version.sh",
35-
"lint:ci": "yarn lint",
35+
"lint:ci": "yarn eslint -c eslint-ci.config.js --cache . && yarn txo-eslint ccr --cache",
3636
"type-check": "tsc --noEmit"
3737
},
3838
"engines": {
@@ -51,7 +51,7 @@
5151
"@types/jest": "^29.5.14",
5252
"@types/node": "^22.10.7",
5353
"concurrently": "^9.1.2",
54-
"eslint-config-txo-typescript": "^4.0.70",
54+
"eslint-config-txo-package-typescript": "^1.0.7",
5555
"graphql": "^16.10.0",
5656
"husky": "^9.1.7",
5757
"jest": "^29.7.0",

src/Model/Types.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,5 @@ export interface Plugin {
2222
) => WHERE,
2323
}
2424

25-
// eslint-disable-next-line @typescript-eslint/no-empty-interface
2625
export interface PluginOptions {
2726
}

0 commit comments

Comments
 (0)