Skip to content

Commit

Permalink
Update parser versions
Browse files Browse the repository at this point in the history
- use 2021 in typescript config
- remove setting a parser options in the jest config
- remove reference to parserOptions.ecmaFeatures.ecmaVersion in core -
  this is invalid configuration, and eslint defaults to using v5 anyway
  • Loading branch information
BPScott committed Nov 26, 2021
1 parent fa8bdd7 commit eb99585
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 13 deletions.
3 changes: 2 additions & 1 deletion packages/eslint-plugin/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ and adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

### Changed

- Update env and ecmaVersion to '2021' in `esnext` preset to support modern language features. [[#296](https://github.com/Shopify/web-configs/pull/296)]
- Update env and ecmaVersion to '2021' in `esnext` and`typescript` presets to support modern language features. [[#296](https://github.com/Shopify/web-configs/pull/296), [#304](https://github.com/Shopify/web-configs/pull/304)]
- Remove configuring `parserOptions` from the `jest` preset as this handled by the the es5/esnext/typescript presets. [[#304](https://github.com/Shopify/web-configs/pull/304)]

## 40.5.0 - 2021-11-18

Expand Down
6 changes: 0 additions & 6 deletions packages/eslint-plugin/lib/config/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,6 @@ const merge = require('merge');
module.exports = {
plugins: ['@shopify', 'eslint-comments'],

parserOptions: {
ecmaFeatures: {
ecmaVersion: 5,
},
},

rules: merge(
require('./rules/best-practices'),
require('./rules/legacy'),
Expand Down
5 changes: 0 additions & 5 deletions packages/eslint-plugin/lib/config/jest.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,6 @@ module.exports = {
'jest/globals': true,
},

parserOptions: {
ecmaVersion: 2015,
sourceType: 'module',
},

plugins: ['jest', 'jest-formatting', '@shopify'],

rules: merge(require('./rules/jest'), require('./rules/jest-formatting'), {
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-plugin/lib/config/typescript.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ module.exports = {
{
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 2018,
ecmaVersion: 2021,
sourceType: 'module',
},
files: ['*.ts', '*.tsx'],
Expand Down

0 comments on commit eb99585

Please sign in to comment.