Skip to content

Commit

Permalink
Remove Babel, set language options to defaults
Browse files Browse the repository at this point in the history
  • Loading branch information
AaronMoat committed Sep 18, 2024
1 parent 137719c commit ed8b92a
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 528 deletions.
8 changes: 6 additions & 2 deletions .changeset/friendly-geckos-bathe.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
---
'eslint-config-seek': minor
'eslint-config-seek': major
---

Babel now treats all Javascript files to have a [`sourceType`](https://babeljs.io/docs/options#sourcetype) of `module` (previously `script`).
Some [language options](https://eslint.org/docs/latest/use/configure/language-options) have been restored to defaults:

- `sourceType` is now set to the default of `module` (previously `script` in some scenarios).
- `ecmaVersion` is now set to the default of `latest` (previously `2022` and `6`)
- Babel has been removed
1 change: 0 additions & 1 deletion .changeset/giant-eagles-fetch.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

Upgrade a number of dependencies. These should have no/minimal impact.

- `@babel/core`, `@babel/eslint-parser`, `@babel/preset-react`
- `eslint-plugin-cypress`
- `eslint-config-prettier`
- `eslint-plugin-jest`
Expand Down
5 changes: 2 additions & 3 deletions .changeset/small-jeans-wave.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ These changes may affect your project setup if you are customising your ESLint c
- https://eslint.org/docs/latest/use/migrate-to-9.0.0
- https://typescript-eslint.io/blog/announcing-typescript-eslint-v8

In addition, through these major upgrades, some lint rules have changed or have been renamed. You will likely need to autofix and/or adjust your code after running ESLint.

In addition, through these major upgrades, some lint rules have changed or have been renamed. You will likely need to autofix and/or adjust your code after running ESLint.

As part of this migration, this project has migrated to Flat ESLint configuration. Read the migration guide: https://eslint.org/docs/latest/use/configure/migration-guide.
As part of this migration, this project has migrated to Flat ESLint configuration. Read the migration guide: https://eslint.org/docs/latest/use/configure/migration-guide.
5 changes: 0 additions & 5 deletions base.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
const importX = require('eslint-plugin-import-x');
const globals = require('globals');
const babelParser = require('@babel/eslint-parser');
const tsParser = require('@typescript-eslint/parser');
const jestPlugin = require('eslint-plugin-jest');
const cypress = require('eslint-plugin-cypress');
Expand Down Expand Up @@ -112,9 +111,7 @@ module.exports = [
...globals.node,
},

parser: babelParser,
ecmaVersion: 6,
sourceType: 'module',

parserOptions: {
requireConfigFile: false,
Expand All @@ -138,8 +135,6 @@ module.exports = [

languageOptions: {
parser: tsParser,
ecmaVersion: 2022,
sourceType: 'module',

parserOptions: {
projectService: true,
Expand Down
13 changes: 1 addition & 12 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,18 +42,7 @@ module.exports = [
},

languageOptions: {
globals: {
...globals.browser,
},

ecmaVersion: 6,
sourceType: 'module',

parserOptions: {
babelOptions: {
presets: [require.resolve('@babel/preset-react')],
},
},
globals: globals.browser,
},

settings: {
Expand Down
3 changes: 0 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,6 @@
},
"homepage": "https://github.com/seek-oss/eslint-config-seek#readme",
"dependencies": {
"@babel/core": "^7.25.2",
"@babel/eslint-parser": "^7.25.1",
"@babel/preset-react": "^7.24.7",
"@eslint/compat": "^1.1.1",
"@eslint/eslintrc": "^3.1.0",
"@eslint/js": "^9.9.1",
Expand Down
Loading

0 comments on commit ed8b92a

Please sign in to comment.