diff options
author | silverwind <me@silverwind.io> | 2023-09-27 06:37:13 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-27 04:37:13 +0000 |
commit | ee27b94b2c84f6604cb0428d6c2a5611161aac14 (patch) | |
tree | 3ba1e48e66c9b236f2851708d5da230e7e2bb0b3 /.eslintrc.yaml | |
parent | 5ef5a0ade6a49c0e55697a0adc9bd33ef9c83a48 (diff) | |
download | gitea-ee27b94b2c84f6604cb0428d6c2a5611161aac14.tar.gz gitea-ee27b94b2c84f6604cb0428d6c2a5611161aac14.zip |
Use vitest globals (#27102)
Enable [globals](https://vitest.dev/config/#globals) in vitest, reducing
the noise in test files.
Diffstat (limited to '.eslintrc.yaml')
-rw-r--r-- | .eslintrc.yaml | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/.eslintrc.yaml b/.eslintrc.yaml index 8495972640..689a4f919c 100644 --- a/.eslintrc.yaml +++ b/.eslintrc.yaml @@ -18,6 +18,7 @@ plugins: - eslint-plugin-regexp - eslint-plugin-sonarjs - eslint-plugin-unicorn + - eslint-plugin-vitest-globals - eslint-plugin-wc env: @@ -45,6 +46,9 @@ overrides: - files: ["*.config.*"] rules: import/no-unused-modules: [0] + - files: ["**/*.test.*", "web_src/js/test/setup.js"] + env: + vitest-globals/env: true - files: ["web_src/js/modules/fetch.js", "web_src/js/standalone/**/*"] rules: no-restricted-syntax: [2, WithStatement, ForInStatement, LabeledStatement, SequenceExpression] |