boltdoggy / parcel-plugin-eslint Goto Github PK
View Code? Open in Web Editor NEW📦 Make Parcel support ESlint.
📦 Make Parcel support ESlint.
"babel-eslint": "^8.2.5",
"eslint": "^5.0.1",
"eslint-config-standard": "^11.0.0",
"eslint-friendly-formatter": "^4.0.1",
"eslint-plugin-import": "^2.13.0",
"eslint-plugin-node": "^6.0.1",
"eslint-plugin-promise": "^3.8.0",
"eslint-plugin-standard": "^3.1.0",
"parcel-plugin-eslint": "^1.0.4"
this is my package.json,when I run parcel ./index.js,I'am blocked by the below error
/Users/fujuewen/private/github/myLodash/index.js: Cannot read property 'length' of null
at /Users/fujuewen/private/github/myLodash/node_modules/parcel-plugin-eslint/node_modules/eslint-friendly-formatter/index.js:184:74
at Array.reduce ()
at module.exports (/Users/fujuewen/private/github/myLodash/node_modules/parcel-plugin-eslint/node_modules/eslint-friendly-formatter/index.js:160:17)
at MyAsset.load (/Users/fujuewen/private/github/myLodash/node_modules/parcel-plugin-eslint/src/EslintAsset.js:22:23)
at
@BoltDoggy you fix this issue, it's awesome!
But this version is not in the npm package.
Update please
<!- description ->
Please see here:
parcel-bundler/parcel#1319 (comment)
this line shouldn't be used inside a plugin, as it might cause unwanted side-effects and is considered a private module/file within parcel and is being updated without keeping in mind semantic versioning:
const JSAsset = require('parcel-bundler/src/assets/JSAsset');
<!- environment ->
Software | Version(s) |
---|---|
Parcel | 1.8.1 |
Node | |
npm/Yarn | |
Operating System |
When using parcel-plugin-eslint
, the serve
command is giving me the following error:
Simply removing parcel-plugin-eslint
from package.json
solved the issue. My dependencies are below (parcel-plugin-eslint
is commented because it is removed).
{
"devDependencies": {
"@types/animejs": "^3.1.0",
"@types/lodash": "^4.14.149",
"@types/swiper": "^5.2.0",
"@typescript-eslint/eslint-plugin": "^2.11.0",
"@typescript-eslint/parser": "^2.11.0",
"autoprefixer": "^9.7.3",
"eslint": "^6.7.2",
"eslint-config-airbnb-base": "^14.0.0",
"eslint-config-airbnb-typescript": "^6.3.1",
"eslint-config-prettier": "^6.7.0",
"eslint-plugin-import": "^2.19.1",
"eslint-plugin-prettier": "^3.1.2",
"husky": "^3.1.0",
"lint-staged": "^9.5.0",
"parcel-bundler": "^1.12.4",
// "parcel-plugin-eslint": "^1.0.8-2",
"prettier": "^1.19.1",
"pretty-quick": "^2.0.1",
"sass": "^1.23.7",
"typescript": "^3.7.3"
},
"dependencies": {
"animejs": "^3.1.0",
"bulma": "^0.8.0",
"cash-dom": "^4.1.5",
"lodash": "^4.17.15",
"sweetalert": "^2.1.2",
"swiper": "^5.2.1"
}
}
Software | Version(s) |
---|---|
parcel-plugin-vue | No |
Parcel | 1.12.4 |
Vue | No |
Node | 12.14.0 |
npm/Yarn | 6.13.4 |
Operating System | macOS Catalina 10.15.2 |
I guess I'm doing something wrong, I installed the plugin and got:
Cannot find module 'parcel-bundler/src/assets/JSAsset'
I've got an index.html
file in ./src/
that refers to ./index.jsx
using a script tag. Then I start parcel with parcel src/index.html
. Without this plugin everything works like a charm.
parcel-bundler: 1.5.1
eslint: 4.16.0
As with eslint-loader
in webpack
, you will see the eslint errors in the console of your browser. Would this be possible with Parcel, using this plugin? That would be an awesome feature :)
<!- description ->
This error occurs when eslint is saved in error, and is always present when the eslint error is resolved,how to solve? thanks~
<!- repo url ->
Show a repo url: https://github.com/l-hammer/YDTemplate
<!- environment ->
Software | Version(s) |
---|---|
Parcel | "^1.6.2" |
Vue | "^2.5.10" |
Node | "^8.8.1" |
npm/Yarn | "^5.6.0" |
Operating System | "macOS High Sierra v10.13.3" |
Description
After installing this plugin I am getting this error Cannot find module 'parcel-bundler/src/Logger'
.
Environment
Software | Version(s) |
---|---|
Parcel | 1.11.0 |
Node | 10.14.2 |
Yarn | 1.12.3 |
Operating System | macOS 10.13.6 |
parcel-plugin-eslint | 1.0.4 |
Is it supposed to show lint errors during the build / watch process? It doesn't seem to work for me, if that's the case :)
parcel-plugin-eslint/package.json
Line 27 in a8935b9
Peer dependencies versions should be lenient and not lock you down to specific patch versions.
In this case, eslint is expected to be exactly version 5.12.x.
Depending on the npm
command, I get a warning or error when I have any eslint version other than 5.12.1 installed.
npm WARN [email protected] requires a peer of eslint@~5.12.1 but none is installed. You must install peer dependencies yourself.
npm ERR! peer dep missing: eslint@~5.12.1, required by [email protected]
I expected to see all errors within the whole project if you save a file. However, only the errors of the last saved file (and its siblings) are shown.
sorry,this issue should be submit to parcel
Does this support vue file?
Software | Version(s) |
---|---|
parcel-plugin-vue | 1.0.3 |
I have prepared a local. eslintrc.js document,I have also installed parcel-plugin-eslint this module locally, version 1.0.0, but still running parcel error, I run the command parcel index.html --no-cache will report this wrong, would like to ask where is the problem?
The error results are as follows:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.