forked from eslint/eslint
-
Notifications
You must be signed in to change notification settings - Fork 0
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
[pull] master from eslint:master #512
Open
pull
wants to merge
119
commits into
zys-contrib:master
Choose a base branch
from
eslint:master
base: master
Could not load branches
Branch not found: {{ refName }}
Could not load tags
Nothing to show
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…#14591) * update package.json (temporary) * update ast-utils - `getFunctionNameWithKind(node)` ... supports class fields and private identifier. And now it uses property names rather than function names if named function expressions are methods because the property name is exposed. - `getFunctionHeadLoc(node)` ... supports class fields. And now returns the range of property names instead of the arrow locations if arrow functions are at method places. - `isSameReference(l,r)` ... supports `PrivateIdentifier`. * update camelcase This commit includes a large refactoring. Previously, the `Identifier` node listener handled all cases by checking parent node types. But because the `Identifier` node has so broad meanings, it's confusing about what kind of nodes it's handling. Now it uses variables and references of `eslint-scope`. And it checks properties, re-exported identifiers, and labels by detailed esqueries. The property check newly supports class fields and private identifiers. This fixes #13021 as well. * update accessor-pairs (test-only) * update class-methods-use-this * update computed-property-spacing * update dot-location (test-only) * update dot-notation (test-only) * update func-names Function expressions at field initializers have inferred names. Therefore the `as-needed` option should not report anonymous functions at field initializers. * update getter-return (test-only) * update grouped-accessor-pairs (test-only) * update indent * update keyword-spacing * update lines-between-class-members (test-only) * update no-dupe-class-members * update no-extra-semi * update no-invalid-this * update no-multi-assign * update no-proto (test-only) * update no-prototype-builtins (test-only) * update no-restricted-properties (test-only) * update no-self-assign * update no-self-compare (test-only) * update no-setter-return * update no-shadow (test-only) * update no-this-before-super (test-only) * update no-throw-literal (test-only) * update no-undef-init * update no-underscore-dangle * update no-unexpected-multiline (test-only) * update no-unreachable * update no-useless-call (test-only) * update no-useless-computed-key * update no-eval * update operator-assignment (test-only) * update operator-linebreak * update padded-blocks (test-only) * update prefer-exponentiation-operator * update prefer-numeric-literals (test-only) * update prefer-object-spread (test-only) * update prefer-promise-reject-errors (test-only) * update prefer-regex-literals (test-only) * update prefer-spread (test-only) * update quotes * update radix (test-only) * update require-atomic-updates (test-only) * update require-unicode-regexp (test-only) * update semi-spacing * update semi-style * update semi * update space-infix-ops * update strict (test-only) * add more tests to no-unexpected-multiline * fix some tests for 7345747 * fix no-invalid-this * fix no-eval * Update eslint-scope * Upgrade Espree * Fix eslint-scope references to parser test * Fix: id-denylist * Update comments * Fix: id-match * Fix: id-length * Update: id-denylist for class fields * Update: id-length * Update: id-denylist code and docs * Docs: id-denylist * Update: id-match Co-authored-by: Nicholas C. Zakas <nicholas@humanwhocodes.com>
* Update: support new regex d flag (fixes #14640) * Upgrade regexpp * Update lib/rules/no-invalid-regexp.js Co-authored-by: Jordan Harband <ljharb@gmail.com> * Upgrade espree Co-authored-by: Jordan Harband <ljharb@gmail.com> Co-authored-by: Nicholas C. Zakas <nicholas@nczconsulting.com>
* Breaking: allow all directives in line comments (fixes #14575) Chore: fix linting problems Update linter.js Update linter.js Update: support eslint-env fix: rm "\n" in the regex * Update lib/linter/linter.js Co-authored-by: Milos Djermanovic <milos.djermanovic@gmail.com> * chore: add more tests * chore: rename var to mustBeOnSingleLine * fix: false postives of no-inline-comments & no-warning-comments * Update lib/rules/utils/ast-utils.js Co-authored-by: Milos Djermanovic <milos.djermanovic@gmail.com> * Update ast-utils.js * chore: add some tests * chore: move a var def to outer scope * chore: add //eslint-enable tests * chore: add more tests for //eslint-env * Update lib/rules/utils/ast-utils.js Co-authored-by: Milos Djermanovic <milos.djermanovic@gmail.com> * Update tests/lib/rules/no-warning-comments.js Co-authored-by: Milos Djermanovic <milos.djermanovic@gmail.com> * chore: add more tests (+1 squashed commit) Squashed commits: [9a4c7d7] chore: add more tests * docs: update config comments usage * Update ast-utils.js * Update ast-utils.js Co-authored-by: Milos Djermanovic <milos.djermanovic@gmail.com>
…14573) * Breaking: Require `meta.hasSuggestions` for rules with suggestions * Docs: add another note about hasSuggestions * Update docs/developer-guide/working-with-rules.md Co-authored-by: Milos Djermanovic <milos.djermanovic@gmail.com> * Update docs/developer-guide/working-with-rules.md Co-authored-by: Milos Djermanovic <milos.djermanovic@gmail.com> * enable eslint-plugin/require-meta-has-suggestions rule internally * update property in Makefile Co-authored-by: Milos Djermanovic <milos.djermanovic@gmail.com>
* Breaking: require `meta` for fixable rules (fixes #13349) * Change error message
* New: Fixable disable directives * Part of the way there: not ready yet * Generally fixed up, and just started on unit tests * lodash.flatMap * Merge branch 'master' * Progress... * Fixed the remaining pre-existing unit tests * Fixed up some tests * unprocessedDirective.parentComment * Avoided rescan by passing commentToken in parentComment * A lil edge case * Fix directive grouping the other direction * Incorrect state directive reference * Simplified parentComment / commentToken range * Use Map in lib/linter/apply-disable-directives.js Co-authored-by: Milos Djermanovic <milos.djermanovic@gmail.com> * Used suggestion for individual directives removal * Boolean in lib/cli-engine/cli-engine.js Co-authored-by: Milos Djermanovic <milos.djermanovic@gmail.com> * Docs fixups * Added tests * Tests and fix for multiple rule lists * Remove unused sourceCode from tests * Added high-level test in linter.js * Apply suggestions from code review Co-authored-by: Brandon Mills <btmills@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: Milos Djermanovic <milos.djermanovic@gmail.com> * Added require * Wrong order... * Also mention in command-line-interface.md * Respect disableFixes (not yet tested) * Fixed up existing tests * Add unit test for options.disableFixes * Apply suggestions from code review Co-authored-by: Milos Djermanovic <milos.djermanovic@gmail.com> Co-authored-by: Milos Djermanovic <milos.djermanovic@gmail.com> Co-authored-by: Brandon Mills <btmills@users.noreply.github.com>
* Breaking: Strict package exports (refs #13654) * Update docs * Fix linting errors * Update docs/developer-guide/nodejs-api.md Co-authored-by: Milos Djermanovic <milos.djermanovic@gmail.com> * Update docs/developer-guide/nodejs-api.md Co-authored-by: Milos Djermanovic <milos.djermanovic@gmail.com> Co-authored-by: Milos Djermanovic <milos.djermanovic@gmail.com>
* Chore: update devdeps to latest * Update package.json * Update .markdownlint.yml * Update package.json
* Updated debug library version to avoid vulnerabilities scan error * update
…14860) * Fix: no-new-fuc should catch calls to Function.apply * Chore: adjust ES6 syntax in no-new-func * Docs: examples for incorrect no-new-func rule * Chore: tests for invalid no-new-func cases * Docs: example and test for incorrect no-new-func rule * Docs: enhance documentation for no-new-func rule * Docs: improve no-new-func description Co-authored-by: Milos Djermanovic <milos.djermanovic@gmail.com> * Fix: revise no-new-func logic Co-authored-by: Milos Djermanovic <milos.djermanovic@gmail.com> * Chore: additional test for Function.bind * Docs: note regarding Function.bind without immediate call * Fix: report CallExpression node instead of MemberExpression node * Docs: modify no-new-func docs Co-authored-by: Milos Djermanovic <milos.djermanovic@gmail.com> * Docs: add no-new-func example Co-authored-by: Milos Djermanovic <milos.djermanovic@gmail.com> * Fix: use maybeCallee instead of parent in no-new-func Co-authored-by: Milos Djermanovic <milos.djermanovic@gmail.com> * add tests * check method name Co-authored-by: Milos Djermanovic <milos.djermanovic@gmail.com>
The example should be: ```js module.exports = { meta: { fixable: "code" // or "whitespace" }, create(context) { // your rule } }; ``` instead of ```js module.exports = function(context) { meta: { fixable: "code" // or "whitespace" }, create(context) { // your rule } }; ```
* Docs: add example .eslintrc.json This adds a `.eslintrc.json` that shows how to set rules config (among others). * Update docs/user-guide/configuring/configuration-files.md Co-authored-by: Nicholas C. Zakas <nicholas@humanwhocodes.com> * Update docs/user-guide/configuring/configuration-files.md Co-authored-by: Nicholas C. Zakas <nicholas@humanwhocodes.com> * Update docs/user-guide/configuring/configuration-files.md Co-authored-by: Nicholas C. Zakas <nicholas@humanwhocodes.com> Co-authored-by: Nicholas C. Zakas <nicholas@humanwhocodes.com>
* Update Rollup Integrations Update Rollup ESLint plugin * Docs: Update Rollup Integrations pdate Rollup ESLint plugin
* Upgrade: @eslint/eslintrc@1.0.3 for Jest workaround * Chore: Remove unused disable comments `eslint-plugin-node`'s `no-missing-require` previously had a false positive report that the `@eslint/eslintrc/universal` export did not exist. Now with the release of `@eslint/eslintrc@1.0.3` with a "fake" (not part of `exports` in `package.json`) `universal` export, as a workaround for Jest, `no-missing-require` is satisfied that it does exist.
* Chore: migrate master to main * fix: keep the branch name to master for website repo Co-authored-by: Milos Djermanovic <milos.djermanovic@gmail.com> * Fix: replace main branch in URL with HEAD * Fix: add both master and main branch in Github workflow Co-authored-by: Jordan Harband <ljharb@gmail.com> * Fix: make the branch name to main for edit url Co-authored-by: Milos Djermanovic <milos.djermanovic@gmail.com> Co-authored-by: Jordan Harband <ljharb@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by pull[bot]
Can you help keep this open source service alive? 💖 Please sponsor : )