Lint package.json requirements with eslint-plugin-json-files
See original GitHub issueWith @kellyselden’s PR here: https://github.com/kellyselden/eslint-plugin-json-files
I think it now makes sense to add some very important, yet presently missing lints for:
- package.json
- for all addons
- keywords must have
ember-addon
- keywords must have
- v2 addons
- require an
addon-main
entry and the file must exist ember-addon
(orember
) entry must existversion
must be set to2
addon-main
must be present inexports
app-js
is optional, but must point at files present in theexports
- a the output /
dist
folder must include at least one entry inexports
(name ofdist
should be configurable) - if a v2 addon is “browser-only”, we don’t need an
engines
entry - forbid
dependencies
(things common in v1 addons)- ember-cli-htmlbars
- ember-cli-babel
- recommend
peerDependencies
(+ devDeps):- ember-source
- require an
- for all addons
Issue Analytics
- State:
- Created 9 months ago
- Comments:8 (8 by maintainers)
Top Results From Across the Web
eslint-plugin-json - npm
eslint plugin for JSON files. Latest version: 3.1.0, ... Start using eslint-plugin-json in your project by running `npm i eslint-plugin-json`.
Read more >azeemba/eslint-plugin-json: Lint your JSON files - GitHub
eslint 's parser is a JavaScript parser. JSON is a stricter subset and things that are valid JavaScript are not valid JSON. This...
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 >Introduction | eslint-plugin-jsonc
ESLint is a great linter for JavaScript. Since JSON (opens new window) is a subset of JavaScript, the same parser and rules can ......
Read more >How can I make eslint detect rule violations in JSON files?
If I understand correctly, JSON files have not valid JavaScript syntax in most cases: outer curly brackets {} are parsed as a block...
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 FreeTop 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
Top GitHub Comments
The ember-cli blueprint already includes various JavaScript linters including eslint-plugin-ember, handlebars linting via ember-template-lint, and there’s a proposal to add stylelint. I’m not sure why package.json linting necessarily belongs in the Ember-JavaScript-focused linting package. Just to suggest an alternative, package.json linting might deserve to be an additional type of linting added to the ember-cli blueprint, once there’s a stable and worthwhile package available for that.
I started a thread in discord, if you want to help work out some details 😅