Skip to content

Commit

Permalink
feat: do not specify env nor globals
Browse files Browse the repository at this point in the history
BREAKING CHANGE: no longer provides env nor globals.
  • Loading branch information
mightyiam committed Apr 10, 2024
1 parent 99e543c commit 53802ac
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 26 deletions.
9 changes: 0 additions & 9 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -398,15 +398,6 @@ const namesOfEslintRulesForWhichWeAreUsingTsEquivalents = eslintRuleNames
.filter(name => Object.hasOwn(rules, `@typescript-eslint/${name}`))

const config = {
env: {
es2021: true,
node: true
},
globals: {
document: 'readonly',
navigator: 'readonly',
window: 'readonly'
},
plugins: [
'@typescript-eslint',
'import',
Expand Down
9 changes: 0 additions & 9 deletions src/test/_util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,21 +53,12 @@ export const equivalents = [...(new Linter()).getRules().keys()]
export const typescriptEslintBottom = '@typescript-eslint_bottom'

export const expectedExportedValue = {
env: {
es2021: true,
node: true
},
plugins: [
'@typescript-eslint',
'import',
'n',
'promise'
],
globals: {
document: 'readonly',
navigator: 'readonly',
window: 'readonly'
},
parser: '@typescript-eslint/parser',
parserOptions: {
project: true
Expand Down
8 changes: 0 additions & 8 deletions src/test/resolved-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,10 @@ const eslint = new ESLint({

const actual = eslint.calculateConfigForFile('foo.js')

test('env', async (t) => {
t.deepEqual((await actual).env, expectedExportedValue.env)
})

test('plugins', async (t) => {
t.deepEqual((await actual).plugins, [...expectedExportedValue.plugins].reverse())
})

test('globals', async (t) => {
t.deepEqual((await actual).globals, expectedExportedValue.globals)
})

test('parser', async (t) => {
t.true((await actual).parser.includes(expectedExportedValue.parser))
})
Expand Down

0 comments on commit 53802ac

Please sign in to comment.