Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to lint .eslintrc.js #6645

Closed
michael-wolfenden opened this issue Jul 10, 2016 · 1 comment
Closed

Unable to lint .eslintrc.js #6645

michael-wolfenden opened this issue Jul 10, 2016 · 1 comment
Labels
archived due to age This issue has been archived; please open a new issue for any further discussion triage An ESLint team member will look at this issue soon

Comments

@michael-wolfenden
Copy link

What version of ESLint are you using?
3.0.1

What parser (default, Babel-ESLint, etc.) are you using?
default

Please show your full configuration:

module.exports = {
    "rules": {
        "semi": [
            "error",
            "never"
        ]
    }
};

What did you do? Please include the actual source code causing the issue.
The only files I have in my project is the configuration file with a semi-colon

// .eslintrc.js
module.exports = {
    "rules": {
        "semi": [
            "error",
            "never"
        ]
    }
};

and another file that also breaks the no-semi colon rule

// index.js
var test = "this should cause an eslint error";

I ran the following command

eslint .

Expecting two errors (one for both files, but only got an error for index.js

C:\Dev\linting-eslintrc-issue\index.js
  1:47  error  Extra semicolon  semi

? 1 problem (1 error, 0 warnings)

I then ran

eslint .eslintrc.js

resulting in

C:\Dev\linting-eslintrc-issue\.eslintrc.js
  0:0  warning  File ignored by default.  Use a negated ignore pattern (like "--ignore-pattern '!<relative/path/to/filename>'") to override

So I assumed I had to un-ignore the eslintrc file, so I tried the following two commands

eslint --ignore-pattern '!.eslintrc.js' .
eslint --ignore-pattern '!.\.eslintrc.js' .

But still only saw an error results for index.js

C:\Dev\linting-eslintrc-issue\index.js
  1:47  error  Extra semicolon  semi

? 1 problem (1 error, 0 warnings)

How can I get eslint to validate the current project directory as well as the .eslintrc.js file?

@eslintbot eslintbot added the triage An ESLint team member will look at this issue soon label Jul 10, 2016
@alberto
Copy link
Member

alberto commented Jul 10, 2016

Duplicate of #4828

@alberto alberto closed this as completed Jul 10, 2016
@eslint-deprecated eslint-deprecated bot locked and limited conversation to collaborators Feb 6, 2018
@eslint-deprecated eslint-deprecated bot added the archived due to age This issue has been archived; please open a new issue for any further discussion label Feb 6, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
archived due to age This issue has been archived; please open a new issue for any further discussion triage An ESLint team member will look at this issue soon
Projects
None yet
Development

No branches or pull requests

3 participants