Comments (7)
@jamestalmage @vdemedes @novemberborn I tried setting it to 3 and it would affect AVA:
lib/assert.js:14:1
✖ 14:1 This function has too many parameters (5). Maximum allowed is 3. max-params
lib/serialize-error.js:5:1
✖ 5:1 This function has too many parameters (4). Maximum allowed is 3. max-params
lib/test.js:17:1
✖ 17:1 This function has too many parameters (4). Maximum allowed is 3. max-params
lib/watcher.js:42:1
✖ 42:1 This function has too many parameters (4). Maximum allowed is 3. max-params
test/test.js:8:1
✖ 8:1 This function has too many parameters (4). Maximum allowed is 3. max-params
✖ 14:10 This function has too many parameters (4). Maximum allowed is 3. max-params
test/visual/run-visual-tests.js:28:1
✖ 28:1 This function has too many parameters (4). Maximum allowed is 3. max-params
from eslint-config-xo.
I think 4 then!
Honestly, 4 is pushing it, but might be a nuisance to fail builds over.
Would be nice if you could define rules twice with different severity:
- warn on 4 parameters
- error on 5+
from eslint-config-xo.
Rules like these seem rather nebulous. There's best practices for public APIs, and specifics of internal implementations. While I'll accept the argument for the former, this rule can't differentiate with the latter.
from eslint-config-xo.
@novemberborn Do you really think it's a good idea to have more than 4 arguments in a function, even if internal?
from eslint-config-xo.
I agree with 4 being the maximum. Actually I might even prefer 3 but I understand that most devs don't want this restrictive.
from eslint-config-xo.
@sindresorhus most cases? No. I just don't think that's something a linter should enforce. Projects can have sordid histories, code can't always be refactored straight away, etc.
from eslint-config-xo.
@novemberborn That applies to pretty much any linter rule though. That's why we have ignore directives.
from eslint-config-xo.
Related Issues (20)
- eslint-index HOT 2
- Add 'consistent-return' ? HOT 1
- Style rules should be warnings, not errors HOT 1
- Integration with Code Analysis (Codacy, CodeClimate) HOT 2
- Add the `padding-line-between-statements` rule HOT 4
- Add prettier-ignore to ignore pattern for capitalized-comments HOT 1
- Got `Configuration for rule "array-element-newline" is invalid` error HOT 3
- require-await ESLint rule HOT 1
- Consider adding 'avoidEscape: true' to quotes rule HOT 2
- Redundency between `no-eq-null` and `eqeqeq` HOT 2
- Conflict between `no-div-regex` and `no-useless-escape` HOT 3
- Request: Enable exceptAfterSingleLine on lines-between-class-members
- Disable some confusing browser globals HOT 1
- Unexpected top-level property "reportUnusedDisableDirectives" in base config HOT 2
- `capitalized-comments` ignore webpack magic comments HOT 1
- Catch-22 with no-unused-vars rule HOT 5
- Make `capitalized-comments` rule ignore `c8`
- Add rules governing `document.getElementById` HOT 1
- Consider update `comma-dangle`? HOT 1
- Upgrade to `@babel/eslint` HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from eslint-config-xo.