Replace TSLint with ESLint and Prettier#2112
Merged
sdirix merged 5 commits intoeclipsesource:masterfrom Apr 21, 2023
Merged
Conversation
✅ Deploy Preview for jsonforms-examples ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
sdirix
reviewed
Mar 20, 2023
Member
sdirix
left a comment
There was a problem hiding this comment.
I tried the configured linter in the various packages.
- I got a lot of
Unexpected any. Specify a different type @typescript-eslint/no-explicit-anywarnings reported. Do you intend to fix them with this PR or shall we disable the rule for now to not make the warnings meaningless? This could be handled in a follow up PR then - There are a lot of
Do not access Object.prototype method 'hasOwnProperty' from target object no-prototype-builtinserrors. Do you intend to fix them with this PR? - There are warning like
'_key' is defined but never used @typescript-eslint/no-unused-vars. Personally I prefer to specify an exception to this rule for variables starting with an underscore. Do you agree? If yes, can you add it? - The
lintscript is also linting config files likerollup.config.js. This should either be avoided or they need specific rules. Personally I would not lint these files. - There is warning when running
lintin the react packagesWarning: React version not specified in eslint-plugin-react settings. See https://github.com/jsx-eslint/eslint-plugin-react#configuration - Some of the test files should probably be excluded as they do things like
requirewhich the linter doesn't like
Also:
- Can you add markdownlint to the recommended extensions?
- There is no linter yet in the vue packages
I think the PR should consist of three commits in the end:
- A commit adding all the configurations
- A commit applying all autofixable resolutions
- A commit fixing all remaining errors and warnings
705a1c2 to
6ac0f06
Compare
Contributor
Author
|
@sdirix I improved the config. See the commit messages for the changes. I am going to squash the changes to have the three suggested commits in the end |
- Remove TSLint dependencies and config - Add ESLint and Prettier dependencies and config for all packages - Add markdownlint to recommended extensions - Use ESLint 7.x instead of 8.x because the Angular eslint plugin for Angular 12 does not work with ESLint 8.x Disabled rules for to be re-enabled later: - explicit any warnings - no-prototype-builtins rule - import/no-named-as-default for 2 packages - vanilla-renderers - material-renderers Part of eclipsesource#1551
6ac0f06 to
ee119cb
Compare
ee119cb to
32b8ec2
Compare
Fix remaining ESLint issues with these exceptions that will be handled in a follow up - import/no-named-as-default in vanilla-renderers, material-renderers - no-prototype-builtins - @typescript-eslint/no-explicit-any - typescript-eslint/ban-types Part of eclipsesource#1551
32b8ec2 to
d447946
Compare
This file contains hidden or 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
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.
#1551