gulpjs / eslint-config-gulp Goto Github PK
View Code? Open in Web Editor NEWSharable eslint config for gulp projects
License: MIT License
Sharable eslint config for gulp projects
License: MIT License
If we are going to continue blocking ES2018 syntax I ask that we enable node/no-unsupported-features/es-syntax here configured with [2, {"version": ">=0.10"}]
. The current situation is that ESLint fails to parse any ES6+, so it only reports the first issue it finds. Updating the ESLint parser options (see #17) and adding that rule would allow ESLint to successfully parse my code changes and report a list of all errors with clearer reasons.
For example using the existing eslint-config-gulp against my current fs-mkdirp-stream
code reports:
/usr/src/npm/fs-mkdirp-stream/index.js
3:1 error Parsing error: The keyword 'const' is reserved
/usr/src/npm/fs-mkdirp-stream/test/index.js
5:5 error Parsing error: Unexpected token {
With #17 plus the addition I'm proposing here:
/usr/src/npm/fs-mkdirp-stream/index.js
3:1 error Block-scoped variables in strict mode are not supported until Node.js 4.0.0. The configured version range is '>=0.10' node/no-unsupported-features/es-syntax
3:7 error Destructuring is not supported until Node.js 6.0.0. The configured version range is '>=0.10' node/no-unsupported-features/es-syntax
5:1 error Block-scoped variables in strict mode are not supported until Node.js 4.0.0. The configured version range is '>=0.10' node/no-unsupported-features/es-syntax
22:5 error Property shorthands are not supported until Node.js 4.0.0. The configured version range is '>=0.10' node/no-unsupported-features/es-syntax
/usr/src/npm/fs-mkdirp-stream/test/index.js
5:5 error Destructuring is not supported until Node.js 6.0.0. The configured version range is '>=0.10' node/no-unsupported-features/es-syntax
11:5 error Destructuring is not supported until Node.js 6.0.0. The configured version range is '>=0.10' node/no-unsupported-features/es-syntax
I have created an ESLint utility module that I thought you might find useful.
The module is called eslint-index
and you can read the full documentation on npm.
eslint-index
provides a great deal of functionality including:
omitted
(not declared anywhere in you ESLint config file)0|off
(declared, but set to 0|off
)1|warn
2|error
status
and/or their group
status
is as described above (omitted|off|warn|error
)group
is eslint
for the core ESLint rules or the name of any of your plugins like react|import|flowtype
number
or a table
to get an overview of your rule settingsdeprecated
are removed from all outputsfilter
omitted
and off
rules, output them as a list
and display the rule doc
links alongsidefilter
eslint
rules and display the rule setting counters in a table
I wrote this plugin to aid the development of my own ESLint config settings and found it incredibly useful for keeping track of everything. I hope you find this module useful and please do let me know if you have any ideas on how to improve it.
Currently we're using our own default rules in the /.eslintrc file.
In gulpjs/gulp#1262 (comment) @phated suggested using the xo config (since felixge/node-style-guide isn't super maintained).
@sindresorhus suggested that we just extend the eslint-config-xo-space config and override the rules that we don't agree with; which I believe were the following (source):
I didn't catch duplicate keys before publish. It'd be nice to have some sort of tests on this repo.
Hello! I wanted to propose a collaboration between this repo and https://github.com/walmartlabs/eslint-config-defaults.
I originally set out to build config-defaults because I was tired of copy pasting my eslint config around and trying to keep them up to date across lots of projects. Eslint's extends
key fixes the distribution problem but there are still two issues:
So with this project I centralized a few configs from major players, I committed to staying on top of the latest rules (and deprecations) and most importantly I made the config composable which allows them to be easily mixed and matched!
It's obvious that you all saw the same problems and it has been enormously helpful to a lot of people but I want to take your config one step further and I am asking for your help. With eslint-config-defaults I want to try to centralize the config from a few thought leaders around the web so that folks have fast, standard and up to date options from the start.
I've been maintaining a few "unofficial" configs for a while now but it's duplicate effort and my hope is to try to collaborate/consolidate. For my part, I am committed to staying on top of the latest rules as they change. I should mention that you all have quite a few missing rules already :).
Potential Objections(?):
Anyway, I wanted to start a conversation and see if we can make it work for both of us.
Currently, some of the repos have a couple of overrides in the main .eslintrc to deal with long test names, etc. We can put those overrides into a file that ships with this library and then add an .eslintrc to the test folder that extends the test ruleset.
It should be replaced with keyword-spacing. I made a fork with this change, if it's ok I can make a PR.
We have node-style-guide and eslint-config-node-style-guide to choose from.
But it may be good to use node-style-guide as a base set of rules and then define our overrides in eslint-config-gulp. It'd make it easier to track that we've overridden the "object-curly-spacing": [2, "always"]
rule (or any other future rules).
Basically, npm i eslint-config-node-style-guide -D
and then set our eslint.json like:
{
"extends": "node-style-guide",
"rules": {
"object-curly-spacing": [2, "always"]
}
}
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.