-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
[TS MVP] Update ESLint configuration #11719
Comments
Potentially, we'll need to release a new packages. We have https://www.npmjs.com/package/eslint-config-ckeditor5 and https://www.npmjs.com/package/eslint-plugin-ckeditor5-rules already. E.g. the latter package contains our custom rules – we may need to port or extend these rules so they can be applied to TS code. It's also unclear where we should define the TS-specific rules. Can it be done in |
So, there seems to be three steps:
|
Potential risk: We defined our ESLint rules ~5 years ago. It may happen that we use some deprecated rules that will not work with TS. Thus, we may need to review more of our rules, than just the ones related to TS. |
I'm starting the discussion here, and this is my proposal. Let's start with all the recommended rules, but:
I would omit rules that require type information, because it would require building the whole project. And I feel it's going to require some very magical configuration to make it working. Apart from checks being slower, of course. |
" interface X {
/** A member */
doIt(): void;
} |
I would like to propose above rule with 'explicit' option. It removes implicit knowledge that properties not marked with access modifier are public and may avoid us issues with unnecessary exposing fields. Also I think it looks tidier :)
|
Decisions so far from internal disputes:
|
We need ESLint helping us with TypeScript code as well as with JavaScript.
Enable ESLint for
*.ts
files and verify that:yarn run lint
checks them,git commit
checks them,We should keep all existing rules for JavaScript that have been working for us, but we need to decide about TypeScript-specific ones.
Part of #11708.
The text was updated successfully, but these errors were encountered: