V8.2.0 Init generated file is broken
See original GitHub issueFailed to load plugin ‘import’ declared in ‘.eslintrc.js » eslint-config-airbnb » /Users/db/winering/core-web/node_modules/eslint-config-airbnb-base/index.js » /Users/db/winering/core-web/node_modules/eslint-config-airbnb-base/rules/imports.js’: Invalid URL: eslintrc.cjs
running node v16.13.0
running npm 8.1.0
"eslint": "^8.2.0",
"eslint-config-airbnb": "^19.0.0",
"eslint-plugin-import": "^2.25.3",
"eslint-plugin-jsx-a11y": "^6.5.1",
"eslint-plugin-react": "^7.27.0",
"eslint-plugin-react-hooks": "^4.3.0",
module.exports = {
env: {
browser: true,
es2021: true,
},
extends: [
'plugin:react/recommended',
'airbnb',
],
parserOptions: {
ecmaFeatures: {
jsx: true,
},
ecmaVersion: 13,
sourceType: 'module',
},
plugins: [
'react',
],
rules: {
},
};
Issue Analytics
- State:
- Created 2 years ago
- Comments:12
Top Results From Across the Web
"storybook init" builds wonky package-lock.json using npm v8
When using React v18 and npm v8, the storybook init command command creates ... Missing: require-from-string@2.0.2 from lock file npm ERR!
Read more >Release Notes for WebSphere Transformation Extender ... - IBM
This document provides information about the release of WebSphere® Transformation Extender V8.2.0.4.
Read more >What could cause an error related to npm not being able to ...
I have node 8.9.4, npm 5.6.0, and angular-CLI 1.5.0 installed as well as typescript 2.0.0. The latter two packages have been installed ...
Read more >Bug listing with status RESOLVED with resolution OBSOLETE ...
systemPrefs with at least two files" status:RESOLVED resolution:OBSOLETE severity:normal ... Bug:107027 - "dev-vcs/cvsd init script for is not working" ...
Read more >Fixes integrated in HCL Digital Experience 8.5.0.0, 9.0 and 9.5 ...
This page lists the individual problems fixed and delivered in the combined cumulative fixes ("CFs") for HCL Portal Server and HCL Web Content...
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
@ljharb Thanks for the reply. I misunderstood the problem, and what appeared to work did not in fact persist after an Atom restart. My
package.json
does not havetype: module
, it’s just vanilla JS and we only use Node to install local packages such aseslint
. I neither work with nor understand ESM modules, sorry 😃My guess is that the way the
imports
plugin is imported changes some parser (?) to expect modules (?). https://github.com/airbnb/javascript/blob/d8cb404da74c302506f91e5928f30cc75109e74d/packages/eslint-config-airbnb-base/rules/imports.js#L1-L11So my new workaround is to just disable those rules in
index.js
Additionally, this bug seems related: https://github.com/AtomLinter/linter-eslint/issues/1448
Yes, the airbnb config absolutely expects that you are authoring ESM and using babel to transpile it. If you’re not doing so, you either have to override a bunch of configuration things, or, you shouldn’t be using the airbnb config at all.