- The users of this style guide will probably expect that all of the rules that it prescribes will be enforced by eslint. However, this is not the case - there is a secret, non-documented segmentation where some rules are enforced and others are not, because they would be "too noisy on a legacy codebase". An example of a problematic rule like this is covered in issue #2020. I propose that all of
ESLint
ESLint is an extensible static-analysis tool for JavaScript and related languages that helps catch errors before they break something in production.
Here are 5,107 public repositories matching this topic...
Given the immense popularity of Docker and the need to harden it different per platform (see ideas below) - we'd like to start writing a Docker best practices section.
You're welcome to contribute ideas and write best practices - writing and brainstorming will people is an amazing way to deepen your Docker understanding.
At first, we want to collect ideas for best practices, solidify a list
https://eslint.org/docs/rules/use-isnan
This is a proposal to modify the use-isnan rule.
Current rule setting:
use-isnan: "error"
Proposed rule setting:
["error", {"enforceForSwitchCase": true}]
The switch statement internally uses the === comparison to match the expression's value to a case clause.
Therefore, it can never match _case NaN. Also, `swit
.jsx instead of .js
Type of issue: (feature suggestion, bug?)
Suggestion
Chapter:
no-chapter
Why use .jsx instead of .js? It's not a best practice: facebook/create-react-app#87 (comment)
Documentation for capIsNewExceptionPattern says the following:
allows any uppercase-started function names that match the specified regex pattern to be called without the new operator.
However, the actual behaviour seems to be that entire call expression is matched against the pa
Hi, I'm a Redux maintainer. I'd like to offer a couple suggestions.
Problem
The current Redux example implementation shows use of reducers with "hand-written" immutable update logic, and has a somewhat complex store configuration. In addition, the project currently uses a "folder-by-type" folder structure.
Proposed Solution
The project should switch to using the official [Redux
-
Updated
Dec 27, 2019 - JavaScript
The README.md contains a lot of advanced config examples for functional tasks. We should probably add some basic ones as well:
'*.js': ['eslint']<- fail when eslint finds issues issues'*.js': ['eslint --fix', 'git add']<- automatically fix eslint issues, and add to commit'*.js': ['prettier --list-different']<- fail when prettier finds issues- `'*.js': ['prettier --write
I want to use eslint's autofix to fix layouts only.
Like this: eslint --fix --fix-type layout
(--fix-type: https://eslint.org/docs/user-guide/command-line-interface#fix-type )
To work that one plugin's rules must contains the type field.
( the type field: https://eslint.org/docs/developer-guide/working-with-rules#rule-basics )
Are there any reasons why this field cannot be added?
Since ESLint doesn't let us disable auto-fix for individual rules, and the capitalized-comments rule, while useful, can be annoying in editors when "auto-fix on save" is enabled.
I download the ZIP and run npm install but then I run expo start and I get:
[11:17:11] Starting project at /Volumes/Sata/repositories/snowflake copy
[11:17:12] Expo DevTools is running at http://localhost:19002
[11:17:12] Error: Missing app.json. See https://docs.expo.io/
[11:17:12] No Expo configuration found. Are you sure this is a project directory
How I solve this?
Th
/* example.ts */
// error: Parsing error: Unexpeced token, expected ":"
interface example {
readonly id: string;
// ^
}/* .eslintrc */
{
"root": true,
"env": {
"es6": true,
"node": true,
"jest/globals": true
},
"parser": "babel-eslint",
"extends": [
"eslint:recommended",
"plugin:prettier/recommended",
"plug
-
Updated
May 25, 2020 - JavaScript
The features section in the docs states that nodemon is available in the project, when it's clearly not. It's not added as a dependency or as a command in the project. Maybe remove this from the docs or actually add nodemon?
Vscode handles > in tags by calling html/tag and eventually closing the tag.
Example request:
[Trace - 7:58:44 AM] Sending request 'html/tag - (138)'. Params: { "textDocument": { "uri": "file:///home/kyoncho/Sources/lsp-docker/demo-projects/Scala/hello/src/test/scala/example/foo.html" }, "position": { "line": 0, "character": 6 } }
[Trace - 7:58:44 AM] Received response 'html/tag
-
Updated
May 13, 2020 - JavaScript
-
Updated
Jun 3, 2020
I also see the issue with:
<label>foo<meter /></label><label>foo<output /></label><label>foo<progress /></label>
Workaround
Add the following to your .eslintrc.js
module.exports = { rules:
'jsx-a11y/label-has-associated-contWhat version of this package are you using?
"eslint-config-standard": "^14.1.0"
What operating system, Node.js, and npm version?
node.js is 10.18.0 and npm version is 6.13.4
What happened?
when i use this npm with eslint, it get something wrong to notice me the errors in the javascript file of my project.like this error:
1:1 error Definition for rule 'no-async-promise-ex
Some folks have noted it would be beneficial to have this repository translated to other languages. One contributor has already volunteered to translate the repository into Russian (woohoo!).
If anyone has the time and drive to help out with other languages, please reply below with the proposed language and I'll give you the "go-ahead"... just to make sure two people don't create translations i
Is this a feature or a bug?
- Feature
- Bug
Please describe the actual behavior.
Currently rush uses a fixed commit message during the rush version --bump workflow:
**If the issue is a bug, how can we reproduce it? Please provide
You can use eslint with CRA without ejecting!
I've updated my fork's installation steps for CRA - you can take them & update yours too.
TL;DR:
- Run
npx install-peerdeps eslint-config-sarpik --dev --yarn - Crack open your
package.jsonand- replace
"extends": "react-app"with"extends": "sarpik"
1
- replace
Describe the bug
CRA with Eslint setting, finding lint error in TSX files:
Definition for rules was not found.
Definition for rule '@typescript-eslint/class-literal-property-style' was not found.eslint(@typescript-eslint/class-literal-property-style)
Definition for rule '@typescript-eslint/method-signature-style' was not found.eslint(@typescript-eslint/method-signatu
Describe the bug
In your documentation, it clearly states:
You may add as many html pages as you’d like to the root level directory, they will automatically be copied and minified into the dist/ folder upon building your site.
So I don't know if this a bug report or a feature request:
I want users to be able to visit website.com/survey instead of survey.html so I've put a
-
Updated
Jun 2, 2020 - JavaScript
It's not recommended to use document.cookie directly as it's easy to get the string wrong. See sindresorhus/eslint-plugin-unicorn#299 and https://developer.mozilla.org/en-US/docs/Web/API/Document/cookie Instead, the user should use a cookie library.
I guess we should only prevent setting document.cookie? There might be valid reasons to read it?
Created by Nicholas C. Zakas
Released June 2013
Latest release 13 days ago
- Repository
- eslint/eslint
- Website
- eslint.org
