eslint-config: consider consuming "simple-import-sort" eslint plugin
See original GitHub issueHi all,
please consider within the RW linting machinery to ship by default simple-import-sort
eslint plugin as would make code objectively more readable out of the box (again IMHO), and (more debatable) also eventually the json
one.
current workaround is to use (in top-level’s package.json
)
"devDependencies": {
"@redwoodjs/core": "^0.19.2-canary.45",
"eslint-plugin-json": "2.1.2",
"eslint-plugin-simple-import-sort": "5.0.3"
},
"eslintConfig": {
"extends": [
"@redwoodjs/eslint-config"
],
"plugins": [
"json",
"simple-import-sort"
],
"rules": {
"json/*": [
"error",
"allowComments"
],
"simple-import-sort/sort": "error"
}
},
but IMHO would be really nice if stuff coming from generators would come ‘nice’ by default.
All the Best,
António
P.S. ironically “import sorting” is already referred as a feature of eslint-config
here
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (8 by maintainers)
Top Results From Across the Web
davidjbradshaw/eslint-config-adjunct - GitHub
A reasonable collection of plugins to use alongside your main esLint configuration - GitHub - davidjbradshaw/eslint-config-adjunct: A reasonable collection ...
Read more >Configuration Files - ESLint - Pluggable JavaScript Linter
A pluggable and configurable linter tool for identifying and reporting on patterns in JavaScript. Maintain your code quality with ease.
Read more >eslint/eslint - Gitter
Hi guys, I'm getting this error Failed to load plugin 'import' declared in 'serverless/.eslintrc.yml » eslint-config-airbnb-base ...
Read more >Create a reusable ESLint config - Coding Licks
Creating an ESLint config package · Step 1: Scaffolding · Step 2: Pick a base config (optional) · Step 3: Install additional plugins...
Read more >eslint-config-fence - npm Package Health Analysis - Snyk
Learn more about eslint-config-fence: package health score, popularity, security, maintenance, versions and more.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hey there - we actually had something like this in our ESLint configuration before, but we removed it because it made it more difficult for people to contribute, and it didn’t work with directory named modules.
Now that we have the babel-module for directory-named-modules we could probably try this again.
Oops, just a quick side note:
there was a typo im my original copy & paste. no need at all to hard-lock the versions so it would be something along …
&& thanks!
António