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

✨ add rules for prototype members #54

Merged
merged 37 commits into from
Dec 3, 2020
Merged

✨ add rules for prototype members #54

merged 37 commits into from
Dec 3, 2020

Conversation

mysticatea
Copy link
Owner

Fixes #24.

Adding rules for prototype methods.

Those new rules are silent by default. Those will start to report disallowed prototype methods if you configured .eslintrc as using TypeScript or the aggressive mode.


Example 1, with TypeScript:

plugins:
- es
parser: "@typescript-eslint/parser"
parserOptions:
  project: tsconfig.json
rules:
  es/no-string-prototype-codepointat: error

Example 2, with Aggressive Mode:

plugins:
- es
rules:
  es/no-string-prototype-codepointat: error
settings:
  es:
    aggressive: true

Example 3, with TypeScript and Aggressive Mode:

(it reports prototype methods on any type)

plugins:
- es
parser: "@typescript-eslint/parser"
parserOptions:
  project: tsconfig.json
rules:
  es/no-string-prototype-codepointat: error
settings:
  es:
    aggressive: true

@mysticatea mysticatea self-assigned this Nov 30, 2020
@mysticatea mysticatea changed the title WIP: add rules for prototype methods ✨ add rules for prototype members Dec 3, 2020
@mysticatea mysticatea merged commit 9259f3a into master Dec 3, 2020
@mysticatea mysticatea deleted the prototype-methods branch December 3, 2020 12:31
@edg2s
Copy link
Contributor

edg2s commented Dec 8, 2020

When will this be released?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create optional rules for prototype methods
2 participants