Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions eslint-ci-rules.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[
"@typescript-eslint/no-magic-numbers",
"@stylistic/arrow-parens",
"@typescript-eslint/no-import-type-side-effects",
"@typescript-eslint/no-unnecessary-condition",
"@typescript-eslint/no-unsafe-type-assertion",
"eslint-comments/require-description",
"@typescript-eslint/prefer-regexp-exec",
"@stylistic/space-before-function-paren",
"@typescript-eslint/consistent-type-exports"
]
13 changes: 13 additions & 0 deletions eslint-ci.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
const ciRules = require('./eslint-ci-rules.json')

module.exports = (async function config() {
const { default: defaultConfigPromise } = await import('./eslint.config.js')
const defaultConfig = await defaultConfigPromise
return [
...defaultConfig,
{
files: ['**/*.ts', '**/*.tsx'],
rules: ciRules.reduce((acc, rule) => ({ ...acc, [rule]: 'warn' }), {}),
},
]
})()
12 changes: 4 additions & 8 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
const txoConfig = require('eslint-config-txo-typescript')

/** @type {import('eslint').Linter.FlatConfig[]} */
const config = [
...txoConfig.default,
]

module.exports = config
module.exports = (async function config() {
const txoPackageReactConfigList = await import('eslint-config-txo-package-react')
return txoPackageReactConfigList.configList
})()
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"sanity": "yarn lint:ci && yarn build && tsc --noEmit && yarn test --coverage && yarn compare-boilerplate-version && echo 'success'",
"semantic-release": "semantic-release",
"update-boilerplate-version": "./scripts/update-boilerplate-version.sh",
"lint:ci": "yarn lint",
"lint:ci": "yarn eslint -c eslint-ci.config.js --cache . && yarn txo-eslint ccr --cache",
"type-check": "tsc --noEmit"
},
"engines": {
Expand Down Expand Up @@ -70,7 +70,7 @@
"@types/react-dom": "^18.3.5",
"@types/react-native": "^0.73.0",
"concurrently": "^9.1.0",
"eslint-config-txo-typescript-react": "^2.0.82",
"eslint-config-txo-package-react": "^1.0.7",
"graphql": "^16.9.0",
"husky": "^9.1.7",
"jest": "^29.7.0",
Expand Down
Loading
Loading