Skip to content

Commit 5e645fc

Browse files
authoredOct 2, 2024··
chore: add oxlint plugin (#2532)
<!-- ☝️ PR title should follow conventional commits (https://conventionalcommits.org). In particular, the title should start with one of the following types: - docs: 📖 Documentation (updates to the documentation or readme) - fix: 🐞 Bug fix (a non-breaking change that fixes an issue) - feat: ✨ New feature/enhancement (a non-breaking change that adds functionality or improves existing one) - feat!/fix!: ⚠️ Breaking change (fix or feature that would cause existing functionality to change) - chore: 🧹 Chore (updates to the build process or auxiliary tools and libraries) --> ### 🔗 Linked issue <!-- If it resolves an open issue, please link the issue here. For example "Resolves #123" --> ### 📚 Description Doesn't support super many rules yet, but is amazingly fast (and easier to config). We can investigate to remove eslint once typescript, vue and graphql rules are supported. Refs oxc-project/oxc#481 <!-- Describe your changes in detail --> <!-- Why is this change required? What problem does it solve? -->
1 parent 8d5c485 commit 5e645fc

File tree

5 files changed

+101
-2
lines changed

5 files changed

+101
-2
lines changed
 

‎.eslintrc.cjs

+2
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ module.exports = {
99
'plugin:nuxt/recommended',
1010
// Turns off all rules that are unnecessary or might conflict with Prettier (needs to be last)
1111
'prettier',
12+
// Disable rules covered by oxlint
13+
'plugin:oxlint/recommended',
1214
],
1315
plugins: ['unused-imports'],
1416
rules: {

‎.vscode/settings.json

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
"journaltitle",
1313
"Nuxt",
1414
"nuxtjs",
15+
"oxlint",
1516
"scimago",
1617
"transpiled",
1718
"tsyringe",

‎middleware/authenticated.global.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export default defineNuxtRouteMiddleware(async (to, _from) => {
2626
) {
2727
return redirectToLogin()
2828
}
29-
} catch (error) {
29+
} catch {
3030
return redirectToLogin()
3131
}
3232
}

‎package.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@
3030
"graphql:generate:watch": "graphql-codegen-esm --watch",
3131
"graphql:validate": "graphql-inspector validate --apollo '{pages,components}/**/*.vue' 'server/**/*.graphql'",
3232
"docker:redis": "docker run -d --rm --name JabRefRedis -p 6380:6379 redis --requirepass jabref",
33-
"lint": "pnpm lint:eslint && pnpm lint:prettier",
33+
"lint": "pnpm lint:oxlint && pnpm lint:eslint && pnpm lint:prettier",
34+
"lint:oxlint": "oxlint",
3435
"lint:eslint": "eslint --ext .ts,.js,.vue,.graphql --ignore-path .gitignore --report-unused-disable-directives .",
3536
"lint:prettier": "prettier --check .",
3637
"postinstall": "nuxi prepare && pnpm generate",
@@ -133,6 +134,7 @@
133134
"eslint-config-prettier": "9.1.0",
134135
"eslint-import-resolver-typescript": "3.6.1",
135136
"eslint-plugin-nuxt": "4.0.0",
137+
"eslint-plugin-oxlint": "^0.9.9",
136138
"eslint-plugin-unused-imports": "3.2.0",
137139
"eslint-plugin-vitest": "0.5.4",
138140
"eslint-plugin-vue": "9.27.0",
@@ -143,6 +145,7 @@
143145
"nuxt": "3.12.4",
144146
"nuxt-graphql-server": "3.1.4",
145147
"nuxt-icon": "0.6.10",
148+
"oxlint": "^0.9.9",
146149
"postinstall-postinstall": "2.1.0",
147150
"prettier": "3.3.3",
148151
"prettier-plugin-organize-imports": "4.1.0",

‎pnpm-lock.yaml

+93
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)
Please sign in to comment.