49 Commits

Author SHA1 Message Date
Koen Vlaswinkel
3cb92233ac Add types to TextMate gulp step 2024-02-14 14:26:42 +01:00
Robert
93e6c53c8d Merge eslintrc files 2024-02-14 11:10:35 +00:00
Robert
55c86016a3 Disallow use of any by default 2024-02-13 14:38:43 +00:00
Nora
a3f9518b78 Set up deprecation plugin 2024-01-24 16:45:02 +00:00
Koen Vlaswinkel
19b24f87ec Merge pull request #3212 from github/koesie10/eslint-rules
Remove more ESLint rule overrides
2024-01-09 11:31:10 +01:00
Koen Vlaswinkel
b2bdcdbcb8 Merge pull request #3210 from github/koesie10/no-cycle
Remove all dependency cycles
2024-01-09 09:31:31 +01:00
Koen Vlaswinkel
c7c79175d2 Remove non-existent filenames/match-regexp ESLint rule 2024-01-08 16:54:07 +01:00
Koen Vlaswinkel
01e7b3fc0e Remove camelcase ESLint rule override 2024-01-08 16:52:03 +01:00
Koen Vlaswinkel
58ea742e85 Enable func-style ESLint rule 2024-01-08 16:47:28 +01:00
Koen Vlaswinkel
188bc53761 Enable no-useless-escape ESLint rule
These fixes maintain the current functionality and do not make any
changes to the matching of the regular expressions.
2024-01-08 16:44:41 +01:00
Koen Vlaswinkel
26e619ba71 Enable no-fallthrough ESLint rule 2024-01-08 16:40:45 +01:00
Koen Vlaswinkel
51627ad971 Remove disabled ESLint rules without linting errors
This removes some ESLint rules that do not give any linting errors when
removing the rule overrides from the config file. This could be because
there are no instances of the rule being violated, or because the rule
is already disabled by some other configuration.
2024-01-08 15:04:55 +01:00
Koen Vlaswinkel
f21ee5173c Enable import/no-cycle ESLint rule 2024-01-08 13:49:26 +01:00
Koen Vlaswinkel
21faed0191 Enforce consistent type specifiers 2024-01-05 17:15:58 +01:00
Koen Vlaswinkel
9d6962ede2 Enforce consistent type imports 2024-01-05 17:13:45 +01:00
Koen Vlaswinkel
38a3778fe1 Fix Storybook React runtime 2024-01-05 11:09:53 +01:00
Koen Vlaswinkel
034bfc230c Remove unnecessary namespace imports
This removes all unnecessary namespace imports. The only namespace
imports that are left are those that are needed for spying on functions
in tests.
2024-01-05 10:42:36 +01:00
Koen Vlaswinkel
e7eb33e0cf Enable jsx-runtime configuration for linting 2024-01-02 10:42:06 +01:00
Koen Vlaswinkel
7a7092de0d Add eslint-plugin-import
It seems like we had some rules that disabled rules of this plugin, but
we didn't actually have it installed. I've now installed it, used the
recommended configuration, and removed our own disable rules. I've fixed
any errors that this introduced.
2023-12-21 17:02:37 +01:00
Koen Vlaswinkel
918661e5ce Enable ESLint curly rule
This enables [the ESLint `curly` rule](https://eslint.org/docs/latest/rules/curly)
with its options set to `all`. This enforces curly braces around all
blocks, even single-line ones.

I've used `npm run lint -- --fix` to fix all occurences.
2023-11-24 14:38:32 +01:00
Koen Vlaswinkel
c928b1eb86 Enable react/jsx-key for fragment shorthands 2023-10-20 16:03:30 +02:00
Sam Partington
b8b15a53dc Enable accessibility linting rules and comment out existing violations
cf https://github.com/github/code-stats-collector/pull/390 /
https://github.com/github/code-scanning/issues/9347
2023-06-28 10:59:18 +01:00
Robert
950a218c29 Enable eslint rule to disallow awaiting a non-thenable type 2023-02-14 17:10:16 +00:00
Charis Kyriakou
a901369c5e Enable eqeqeq ESLint rule and fix violations (#2043) 2023-02-07 09:36:18 +00:00
Koen Vlaswinkel
a3c6b362f8 Remove unnecessary disabled rules
These rules are already disabled in the base config, so they don't need
to be disabled individually anymore.
2023-01-30 16:55:05 +01:00
Koen Vlaswinkel
5f382a5677 Combine ESLint configurations
Instead of having different ESLint configuration files in each
directory which don't seem to inherit the configuration correctly, this
will add `overrides` in the root file.
2023-01-30 16:43:19 +01:00
Robert
13dd5298bf Enforce that promise rejection values must have unknown type 2023-01-25 16:34:47 +00:00
Charis Kyriakou
bbdbe01e03 Add test tsconfigs in eslint projects (#1916) 2023-01-03 12:17:17 +00:00
Elena Tanasoiu
b45c67f24f Autofix prefer-template 2022-12-01 09:10:46 +00:00
Elena Tanasoiu
30cf72b6c8 Autofix object-shorthand 2022-12-01 09:10:46 +00:00
Elena Tanasoiu
754fa67231 Autofix import/no-duplicates 2022-12-01 09:08:33 +00:00
Elena Tanasoiu
706f2e3ca1 Autofix eslint-comments/no-unused-disable 2022-12-01 09:08:33 +00:00
Elena Tanasoiu
dc5d8daa84 Autofix @typescript-eslint/array-type 2022-12-01 09:08:33 +00:00
Elena Tanasoiu
0b9ba3cb94 Start by turning off all rules that have found offences
In the next commits we'll turn these rules on, one-by-one, and then
autofix the offenses.

At the end we'll be left with the rules that require manual attention.
2022-12-01 09:08:33 +00:00
Elena Tanasoiu
f539ba3b85 Enable eslint-plugin-github in main extension folder
There are 5 eslint config files. We're going to enable this plugin one file at a time
and then deal with the fixes.
2022-12-01 09:08:32 +00:00
Koen Vlaswinkel
f41ca1a330 Add Prettier
This adds Prettier and makes it replace tsfmt. VSCode is set to use
Prettier for formatting TypeScript/TSX files and format on save since
Prettier is very fast and does not cause any noticeable delay.
2022-11-16 19:04:17 +01:00
Koen Vlaswinkel
c1f24142c9 Run ESLint on all files
This wil remove the discrepancy between the files on which ESLint is run
when `lint-staged` is used and the files that are checked using
`npm run lint` and `npm run format`.

It will now also include the `.storybook` directory which was previously
excluded from the ESLint configuration.
2022-10-31 13:22:27 +01:00
Koen Vlaswinkel
762288b57f Add tsconfig.json file for scripts directory
This will fix linting errors when `lint-staged` is run and there are
changed files in the `scripts` directory.
2022-10-31 13:21:56 +01:00
Koen Vlaswinkel
e5376b3469 Add DOM tests for variant analysis header 2022-09-14 13:56:38 +02:00
shati-patel
06b22511a7 Update to VS Code 1.48.0
partial cherry-pick from `qc-development` branch
2021-06-14 18:42:42 +01:00
Andrew Eisenberg
1d414bac55 Update linting rules
Add the `@typescript-eslint/no-floating-promises` rule with an allowance
for floating promises if `void` is used.

This increases safety and ensures that we are explicit when we avoid
awaiting a promise. I already caught a few bugish locations.

In general, we don't need to await the results of logging calls.

databases-ui, we were using a deprecated method for removing a
directory. `fs.rmdir` instead of `fs.remove`.
2021-06-11 14:08:25 -07:00
Jason Reed
49c0d39a50 Replace javascript gulpfile with typescript 2020-07-14 13:51:49 -04:00
Jason Reed
528cbc8d49 Move more config into local typescript gulpfile 2020-07-14 12:52:06 -04:00
Andrew Eisenberg
45dc2a29cf Auto-format on commit and use single quotes 2020-06-16 08:44:37 -07:00
Andrew Eisenberg
7d23a833b1 Add semi-colon linting 2020-05-13 12:06:53 -07:00
Andrew Eisenberg
de8b7d44cd Avoid linting indentation rules
This is already handled by tsfmt and eslint has
some slight differences.
2020-05-13 11:29:32 -07:00
Andrew Eisenberg
bb28dafc43 lint: Add proper linting for react 2020-03-25 12:02:12 -07:00
Andrew Eisenberg
5facab1f9e lint: Fix linting and update linting rules 2020-03-19 08:11:20 -07:00
Andrew Eisenberg
443abea7d7 chore: Introduce eslint
Adds eslint support and fixes linting problems in a few files.

This change adds an npm task, but does not enforce linting for builds.

The idea is to slowly fix linting problems over time.

Closes #238.
2020-03-17 09:14:02 -07:00