-
Notifications
You must be signed in to change notification settings - Fork 1
Add support ESLint 8 #137
Add support ESLint 8 #137
Conversation
"lerna": "^4.0.0", | ||
"prettier": "^2.3.1", | ||
"typescript": "^4.3.2" | ||
"prettier": "2.4.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: is there a reason we must pin to this specific version of prettier
, or can we specify a ^
range in keeping with other devDeps?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2.4 has the new brackets flag config, so this becomes the minimum version the workspace should work with
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I get ya. So the general rule is:
- in peerDependencies, specify the minimum supported version of a package, using a
^
to pin the major version and enforce a minimum minor version - in devDependencies, specify the minimum supported version of a package, using the exact version (i.e. no
^
or~
)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that's was the thinking yeah – make it as flexible as possible to consume, but make sure we develop with the smallest possible feature set we need. and then obvs if we need a feature from a later version that becomes the baseline
@@ -13,7 +13,7 @@ | |||
"url": "https://github.com/guardian/configs/issues" | |||
}, | |||
"peerDependencies": { | |||
"prettier": "^2.0.0" | |||
"prettier": "^2.4.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why force consumers to upgrade? Are we using features that were added after 2.0.0?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah the new new brackets config comes with 2.4
"eslint-plugin-eslint-comments": "^3.2.0", | ||
"eslint-plugin-import": "^2.23.4", | ||
"eslint-plugin-prettier": "^3.4.0", | ||
"eslint": "8.0.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
8.4.1 is the latest, should we be using that instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The idea was to install the minimum possible version in the workspace that our packages should work with, to make using them as flexible as possible without accidentally using features added after the minimum version
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is cool. I think it'll be a breaking change, so major bump when we publish?
What does this change?
jsxBracketSameLine
is deprecatedeslint
an explicit peerDep of@guardian/eslint-config-typescript
@guardian/eslint-config-typescript
's dependency on@guardian/eslint-config
to a specific versionalso: