-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace standard
with standardx
#79
Conversation
StandardJS covers 95% of our linting needs in one simple package. However there are some things it has no opinion on which we feel strongly about -- for example, ensuring parameters are always enclosed in brackets (even in cases where a single parameter's brackets are optional). We'd like to be able to flag these things up during linting and `standardx` sems like the perfect package -- a drop-in replacement for `standard` which allows extra rules to be added. This means we can extend our linting without the pain of installing full-fat ESLint.
Dropping in `standardx` in place of `standard` didn't immediately work! The first problem was an error `Failed to load config "standard" to extend from`. There was no consensus online how to fix this, some people suggested installing a bunch of ESLint modules, however we found that simply reinstalling `standard` did the trick. The second problem was numerous `Parsing error: Invalid ecmaVersion` errors. This seems to be an incompatibility between `standardx` and `eslint`, where `eslint` defaults to ecmaVersion 13 but `standardx` isn't compatible with this. Enforcing ecmaVersion 12 in our `package.json` resolved this.
6a5d093
to
1ffb35f
Compare
At present we feel that
So for now, we mark this as "do not merge" and will keep an eye on the state of |
It is a shame. But the 2 PR's that suggest standards will get updated and support additional rules have not been updated since we created this PR. One of the folks has no gone to ESLint and after some consideration, I've come to the conclusion that is where we need to go. We can produce all the coding conventions we like. The good folks read them but then forget quickly. The rest don't bother because they know they'll forget them. It is not fair that new members of our team have to go through a period of having their PRs picked up on things that are buried in docs or that we simply haven't got around to writing up. So, it is time to start managing the consistency of our project properly and just accept we need to switch to using ESLint. We've started to have a play and they'll be more changes coming in the next weeks. But they mean we can finally put this idea to rest. |
NOTE: We will not be implementing this change until either
standardx
is updated to support the latest version ofstandard
, orstandard
is amended to allow setting of custom rules. See comment below for further details.StandardJS covers 95% of our linting needs in one simple package. However there are some things it has no opinion on which we feel strongly about -- for example, ensuring parameters are always enclosed in brackets (even in cases where a single parameter's brackets are optional).
We'd like to be able to flag these things up during linting and
standardx
sems like the perfect package -- a drop-in replacement forstandard
which allows extra rules to be added. This means we can extend our linting without the pain of installing full-fat ESLint.We did encounter a couple of problems after removing
standard
and installingstandardx
:Failed to load config "standard" to extend from
. There was no consensus online how to fix this, some people suggested installing a bunch of ESLint modules, however we found that simply reinstallingstandard
did the trick.Parsing error: Invalid ecmaVersion
error for each file. This seems to be an incompatibility betweenstandardx
andeslint
, whereeslint
defaults to ecmaVersion 13 butstandardx
isn't compatible with this. Enforcing ecmaVersion 12 in ourpackage.json
resolved this. Note that ifstandardx
is updated then this may no longer be necessary.