Skip to content

Commit 4a27f6b

Browse files
committed
Revert "feat: expose 'builders' and tsProjects option from ESLint config"
This reverts commit 77bb2d0.
1 parent ed11e76 commit 4a27f6b

File tree

3 files changed

+4
-18
lines changed

3 files changed

+4
-18
lines changed

src/config/eslintrc-react.js

+1-8
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,3 @@
11
const {buildConfig} = require('./helpers/eslint')
22

3-
const defaultOptions = {withReact: true}
4-
5-
const defaultExport = buildConfig(defaultOptions)
6-
7-
defaultExport.buildConfig = options =>
8-
buildConfig({...defaultOptions, ...options})
9-
10-
module.exports = defaultExport
3+
module.exports = buildConfig({withReact: true})

src/config/eslintrc.js

+1-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
11
const {buildConfig} = require('./helpers/eslint')
22

3-
const defaultExport = buildConfig()
4-
5-
defaultExport.buildConfig = buildConfig
6-
7-
module.exports = defaultExport
3+
module.exports = buildConfig()

src/config/helpers/eslint.js

+2-5
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,7 @@ const parserRules = (typescript = false) => {
2222
}
2323
}
2424

25-
const buildConfig = ({
26-
withReact = false,
27-
tsProjects = './**/*/tsconfig.json',
28-
} = {}) => {
25+
const buildConfig = ({withReact = false} = {}) => {
2926
const ifReact = (t, f) => (withReact || hasReact ? t : f)
3027

3128
return {
@@ -59,7 +56,7 @@ const buildConfig = ({
5956
{
6057
files: ['**/*.ts?(x)'],
6158
parserOptions: {
62-
project: tsProjects,
59+
project: './**/*/tsconfig.json',
6360
},
6461
extends: [
6562
'plugin:@typescript-eslint/recommended-requiring-type-checking',

0 commit comments

Comments
 (0)