Skip to content

Commit e96726a

Browse files
manual bump to gts 7, and necessary code nits (#7826)
Modifies the config file to the flat format described [here](https://eslint.org/docs/latest/use/configure/migration-guide#start-using-flat-config-files). Also, `.eslintrc.json` has been deprecated in eslint 9, [being replaced by `eslint.config.js`](https://eslint.org/docs/latest/use/migrate-to-9.0.0#-new-default-config-format-eslintconfigjs). Opted to use CommonJS here because it's cleaner, matches up with the [gts README example](https://github.com/google/gts#working-with-eslint) and we shouldn't need to migrate for a while. There are some stricter lint rules introduced by the Typescript updates: ``` @typescript-eslint/no-unused-expressions @typescript-eslint/no-wrapper-object-types ``` that I also patched up in the code. --------- Co-authored-by: Pavol Juhas <juhas@google.com>
1 parent 479c2bc commit e96726a

File tree

8 files changed

+683
-934
lines changed

8 files changed

+683
-934
lines changed

cirq-web/cirq_web/.eslintignore

Lines changed: 0 additions & 7 deletions
This file was deleted.

cirq-web/cirq_web/.eslintrc.json

Lines changed: 0 additions & 12 deletions
This file was deleted.

cirq-web/cirq_web/dist/bloch_sphere.bundle.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
module.exports = [
2+
...require('gts'),
3+
{
4+
ignores: [
5+
'build/',
6+
'**/node_modules/',
7+
'**/dist/',
8+
'vitest.config.ts',
9+
'vitest.setup.ts',
10+
'vite.config.ts',
11+
'vitest.e2e.config.ts',
12+
],
13+
},
14+
{
15+
files: ['**/*.ts'],
16+
rules: {
17+
'n/no-unpublished-import': 'off',
18+
'max-len': ['error', 100],
19+
},
20+
},
21+
];

0 commit comments

Comments
 (0)