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

Remove stray .eslintrc.yml file #6685

Closed
wants to merge 1 commit into from
Closed

Remove stray .eslintrc.yml file #6685

wants to merge 1 commit into from

Conversation

irvinebroque
Copy link

What issue does this pull request address?

A regression in v3.1.0 causing the following eslint error to be thrown in every file:

2:1 error Definition for rule '.eslintrc.yml' was not found .eslintrc.yml

Given the following config

{
  "parserOptions": {
    "ecmaVersion": 6,
    "ecmaFeatures": {
      "jsx": true,
      "impliedStrict": true,
      "experimentalObjectRestSpread": true
    },
    "sourceType": "module"
  },
  "env": {
    "browser": true,
    "node": true,
    "jest": true,
    "es6": true
  },
  "extends": [
    "eslint:all",
    "plugin:jasmine/recommended"
  ],
  "parser": "babel-eslint",
  "rules": {
    "quotes": ["error", "single"],
    "strict": ["error", "never"],
    "array-bracket-spacing": ["error", "never"],
    "block-scoped-var": "warn",
    "camelcase": "warn",
    "comma-spacing": ["error", {"before": false, "after": true}],
    "computed-property-spacing": ["error", "never"],
    "complexity": ["error", 11],
    "consistent-return": "error",
    "constructor-super": "error",
    "no-duplicate-imports": "error",
    "curly": "warn",
    "eqeqeq": "error",
    "eol-last": "error",
    "indent": ["error", 2, {"VariableDeclarator": 2}],
    "max-depth": ["error", 4],
    "no-alert": "warn",
    "no-array-constructor": "error",
    "no-bitwise": "error",
    "no-caller": "error",
    "no-unsafe-finally": "error",
    "no-useless-computed-key": "error",
    "no-catch-shadow": "error",
    "no-continue": "error",
    "no-cond-assign": "error",
    "no-div-regex": "error",
    "no-else-return": "error",
    "no-eq-null": "error",
    "no-extend-native": "error",
    "no-floating-decimal": "error",
    "no-implied-eval": "error",
    "no-inline-comments": "error",
    "no-iterator": "error",
    "no-label-var": "error",
    "no-lone-blocks": "error",
    "no-lonely-if": "error",
    "no-loop-func": "error",
    "no-multiple-empty-lines": "error",
    "no-new": "error",
    "no-new-func": "error",
    "no-new-object": "error",
    "no-new-require": "error",
    "no-new-wrappers": "error",
    "no-param-reassign": "error",
    "no-path-concat": "error",
    "no-const-assign": "error",
    "no-dupe-class-members": "error",
    "no-eval": "error",
    "no-extra-bind": "error",
    "no-shadow": "error",
    "no-multi-spaces": "warn",
    "no-native-reassign": "error",
    "no-nested-ternary": "warn",
    "no-proto": "error",
    "no-throw-literal": "error",
    "no-redeclare": "error",
    "no-undef": "error",
    "no-use-before-define": "error",
    "no-unused-vars": "error",
    "prefer-spread": "warn",
    "prefer-arrow-callback": "warn",
    "arrow-spacing": "warn",
    "prefer-const": "warn",
    "prefer-template": "warn",
    "no-var": "error",
    "no-useless-escape": "error",
    "max-len": ["warn", 120],
    "max-statements-per-line": ["error", { "max": 3 }],
    "jsx-quotes": "warn",
    "keyword-spacing": "error",
    "promise/param-names": "warn",
    "promise/always-return": "warn",
    "promise/catch-or-return": "warn",
    "import-order/import-order": "error",
    "babel/generator-star-spacing": "warn",
    "babel/new-cap": "warn",
    "babel/object-shorthand": "warn",
    "babel/arrow-parens": "warn",
    "babel/no-await-in-loop": "warn",
    "babel/object-curly-spacing": "off",
    "babel/array-bracket-spacing": "error",
    "babel/flow-object-type": ["error", "comma"],
    "immutable/no-let": "warn",
    "jasmine/no-spec-dupes": [1, "branch"],
    "react/display-name": "warn",
    "react/forbid-prop-types": "warn",
    "react/jsx-boolean-value": ["warn", "always"],
    "react/jsx-closing-bracket-location": "warn",
    "react/jsx-curly-spacing": "warn",
    "react/jsx-equals-spacing": ["error", "never"],
    "react/jsx-first-prop-new-line": ["error", "multiline"],
    "react/jsx-handler-names": "warn",
    "react/jsx-indent-props": ["warn", 2],
    "react/jsx-indent": ["warn", 2],
    "react/jsx-key": "warn",
    "react/jsx-max-props-per-line": ["warn", { "maximum": 2}],
    "react/jsx-no-bind": ["error"],
    "react/jsx-no-duplicate-props": "warn",
    "react/jsx-no-literals": "off",
    "react/jsx-no-undef": "error",
    "react/jsx-no-target-blank": "error",
    "react/jsx-pascal-case": "warn",
    "react/jsx-uses-react": "error",
    "react/jsx-uses-vars": "error",
    "react/jsx-sort-props": ["warn", {
      "callbacksLast": true,
      "shorthandFirst": true,
      "ignoreCase": true
    }],
    "react/jsx-sort-prop-types": "off",
    "react/jsx-space-before-closing": "off",
    "react/no-danger": "warn",
    "react/no-deprecated": "warn",
    "react/no-did-mount-set-state": "warn",
    "react/no-did-update-set-state": "warn",
    "react/no-direct-mutation-state": "warn",
    "react/no-is-mounted": "warn",
    "react/no-multi-comp": "warn",
    "react/no-string-refs": "warn",
    "react/no-comment-textnodes": "error",
    "react/no-unknown-property": "error",
    "react/prefer-es6-class": "warn",
    "react/prop-types": "error",
    "react/react-in-jsx-scope": "error",
    "react/require-extension": "warn",
    "react/require-render-return": "error",
    "react/self-closing-comp": "warn",
    "react/sort-comp": "error",
    "react/sort-prop-types": ["warn", {
      "callbacksLast": true,
      "ignoreCase": true,
      "requiredFirst": true
    }],
    "react/wrap-multilines": "warn",
    "flowtype/space-after-type-colon": [1, "always"],
    "flowtype/space-before-type-colon": [1, "never"],
    "flowtype/type-id-match": [1, "^([A-Z][a-z0-9]+)"],
    "flowtype/require-valid-file-annotation": ["error", "always"],
    "semi": ["error", "never"],
    "flow-vars/define-flow-type": "warn",
    "flow-vars/use-flow-type": "warn",
    "array-callback-return": "off",
    "arrow-body-style": "off",
    "block-spacing": "off",
    "brace-style": "off",
    "dot-location": "off",
    "dot-notation": "off",
    "func-names": "off",
    "func-style": "off",
    "generator-star-spacing": "off",
    "global-require": "off",
    "id-length": "off",
    "init-declarations": "off",
    "key-spacing": "off",
    "lines-around-comment": "off",
    "max-lines": "off",
    "max-params": "off",
    "max-statements": "off",
    "new-cap": "off",
    "newline-after-var": "off",
    "newline-before-return": "off",
    "newline-per-chained-call": "off",
    "no-empty-function": "off",
    "no-extra-parens": "off",
    "no-implicit-coercion": "off",
    "no-invalid-this": "off",
    "no-magic-numbers": "off",
    "no-mixed-operators": "off",
    "no-negated-condition": "off",
    "no-plusplus": "off",
    "no-process-env": "off",
    "no-sequences": "off",
    "no-spaced-func": "off",
    "no-sync": "off",
    "no-ternary": "off",
    "no-trailing-spaces": "off",
    "no-undefined": "off",
    "no-underscore-dangle": "off",
    "no-unneeded-ternary": "off",
    "no-unused-expressions": "off",
    "object-curly-newline": ["off"],
    "object-curly-spacing": ["off"],
    "object-property-newline": "off",
    "one-var": ["error", "never"],
    "operator-assignment": "off",
    "operator-linebreak": "off",
    "padded-blocks": "off",
    "prefer-reflect": "off",
    "quote-props": "off",
    "require-jsdoc": "off",
    "sort-imports": "off",
    "space-before-blocks": "off",
    "space-before-function-paren": "off",
    "space-in-parens": "off",
    "space-infix-ops": "off",
    "space-unary-ops": "off",
    "spaced-comment": "off",
    "valid-jsdoc": "off",
    "wrap-regex": "off",
    "multiline-ternary": "off"
  },
  "plugins": [
    "babel",
    "flow-vars",
    "flowtype",
    "immutable",
    "import-order",
    "jasmine",
    "promise",
    "react"
  ]
}

What changes did you make? (Give an overview)

I removed what appears to be a stray .eslintrc.yml file in the lib/rules directory.

Is there anything you'd like reviewers to focus on?

Is this .eslintrc.yml file actually needed?

@mention-bot
Copy link

@irvinebroque, thanks for your PR! By analyzing the annotation information on this pull request, we identified @vitorbal to be a potential reviewer

@eslintbot
Copy link

Thanks for the pull request, @irvinebroque! I took a look to make sure it's ready for merging and found some changes are needed:

  • The commit summary needs to begin with a tag (such as Fix: or Update:). Please check out our guide for how to properly format your commit summary and update it on this pull request.
  • Pull requests with code require an issue to be mentioned at the end of the commit summary, such as (fixes #1234). Please update the commit summary with an issue (file a new issue if one doesn't already exist).

Can you please update the pull request to address these?

(More information can be found in our pull request guide.)

@jquerybot
Copy link

Thank you for your pull request. It looks like this may be your first contribution to a jQuery Foundation project, if so we need you to sign our Contributor License Agreement (CLA).

📝 Please visit http://contribute.jquery.org/CLA/ to sign.

After you signed, the PR is checked again automatically after a minute. If there's still an issue, please reply here to let us know.


If you've already signed our CLA, it's possible your git author information doesn't match your CLA signature (both your name and email have to match), for more information, check the status of your CLA check.

@eslintbot
Copy link

Thanks for the pull request, @irvinebroque! I took a look to make sure it's ready for merging and found some changes are needed:

  • The commit summary needs to begin with a tag (such as Fix: or Update:). Please check out our guide for how to properly format your commit summary and update it on this pull request.
  • Pull requests with code require an issue to be mentioned at the end of the commit summary, such as (fixes #1234). Please update the commit summary with an issue (file a new issue if one doesn't already exist).

Can you please update the pull request to address these?

(More information can be found in our pull request guide.)

@eslintbot
Copy link

LGTM

@platinumazure
Copy link
Member

Looks like this is due to an internal rule we introduced for our own rule validation. My guess is we have logic which iterates over all files in lib/rules when eslint:all is specified. We should filter that list somehow, maybe by file extension.

@vitorbal Thoughts?

@platinumazure
Copy link
Member

Ack, meant to comment on the issue. For the PR, I would say this is not the right fix because the YAML is intentional, not stray.

@ilyavolodin
Copy link
Member

Agree. This is not the right way to fix this. We should move that .eslintrc.yml file out rules directory, or change our code that works for picking up all of the rules. We will also have to change some other parts of code then (like deployment scripts).

@nzakas
Copy link
Member

nzakas commented Jul 16, 2016

Let's just keep it simple: ensure the code that creates eslint:all filters for JS files.

@ilyavolodin
Copy link
Member

@nzakas We also iterate through all of the files in rules directory as part of the release script here: https://github.com/eslint/eslint/blob/master/Makefile.js#L139 It doesn't seem to be causing issue with the demo, but we should probably modify it as well.

@cristian-sima
Copy link

I am also getting this issue

@vitorbal
Copy link
Member

Oops, I'm very sorry for this regression :(
Maybe we can work in a regression test in this PR as well?

@ilyavolodin It seems like all the places in the Makefile that iterate through the files in the rules directory also filter out non ".js" files before doing anything, including the spot you mentioned in #6685 (comment). Is there any spots I might have missed?

@ilyavolodin
Copy link
Member

@vitorbal Probably not, I just remembered that we are iterating through that directory in more then one place.

@ljharb
Copy link
Sponsor Contributor

ljharb commented Jul 16, 2016

This is also the cause of sarbbottam/eslint-find-rules#132, fwiw

@ljharb
Copy link
Sponsor Contributor

ljharb commented Jul 16, 2016

Since eslint doesn't export a list of rules for people to rely on, it's likely that many tools will resort to this mechanism for locating them. Perhaps a better long term solution is to export a list of all rules, so that others can rely on that instead?

@ilyavolodin
Copy link
Member

@ljharb We have an open issue for that: #6525

@nzakas
Copy link
Member

nzakas commented Jul 18, 2016

Closing in favor of #6696

@nzakas nzakas closed this Jul 18, 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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

10 participants