diff options
author | Kristóf Marussy <kristof@marussy.com> | 2024-04-08 16:20:58 +0200 |
---|---|---|
committer | Kristóf Marussy <kristof@marussy.com> | 2024-04-08 17:52:35 +0200 |
commit | f862867a07fb09085a28bf134eb42276fde26540 (patch) | |
tree | b84f08003f0c143e27c3e3a339ab53f2aa339984 /.eslintrc.cjs | |
parent | fix(language): Sonar lint issue (diff) | |
download | refinery-f862867a07fb09085a28bf134eb42276fde26540.tar.gz refinery-f862867a07fb09085a28bf134eb42276fde26540.tar.zst refinery-f862867a07fb09085a28bf134eb42276fde26540.zip |
docs: add Docusaurus website
Also refactor Yarn buildscripts.
Diffstat (limited to '.eslintrc.cjs')
-rw-r--r-- | .eslintrc.cjs | 29 |
1 files changed, 27 insertions, 2 deletions
diff --git a/.eslintrc.cjs b/.eslintrc.cjs index da434649..f65f2f65 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs | |||
@@ -9,6 +9,7 @@ const path = require('node:path'); | |||
9 | // Allow the Codium ESLint plugin to find `tsconfig.json` from the repository root. | 9 | // Allow the Codium ESLint plugin to find `tsconfig.json` from the repository root. |
10 | const project = [ | 10 | const project = [ |
11 | path.join(__dirname, 'tsconfig.json'), | 11 | path.join(__dirname, 'tsconfig.json'), |
12 | path.join(__dirname, 'subprojects/docs/tsconfig.json'), | ||
12 | path.join(__dirname, 'subprojects/frontend/tsconfig.json'), | 13 | path.join(__dirname, 'subprojects/frontend/tsconfig.json'), |
13 | path.join(__dirname, 'subprojects/frontend/tsconfig.node.json'), | 14 | path.join(__dirname, 'subprojects/frontend/tsconfig.node.json'), |
14 | path.join(__dirname, 'subprojects/frontend/tsconfig.shared.json'), | 15 | path.join(__dirname, 'subprojects/frontend/tsconfig.shared.json'), |
@@ -48,8 +49,10 @@ module.exports = { | |||
48 | ignorePatterns: [ | 49 | ignorePatterns: [ |
49 | 'build/**/*', | 50 | 'build/**/*', |
50 | 'subprojects/*/build/**/*', | 51 | 'subprojects/*/build/**/*', |
51 | 'subprojects/*/dev-dist/**/*', | 52 | 'subprojects/docs/.docusaurus/**/*', |
52 | 'subprojects/*/src/**/*.typegen.ts', | 53 | 'subprojects/docs/.yarn/**/*', |
54 | 'subprojects/frontend/dev-dist/**/*', | ||
55 | 'subprojects/frontend/src/**/*.typegen.ts', | ||
53 | ], | 56 | ], |
54 | rules: { | 57 | rules: { |
55 | // In typescript, some class methods implementing an inderface do not use `this`: | 58 | // In typescript, some class methods implementing an inderface do not use `this`: |
@@ -108,6 +111,13 @@ module.exports = { | |||
108 | }, | 111 | }, |
109 | }, | 112 | }, |
110 | { | 113 | { |
114 | files: ['*.cts'], | ||
115 | rules: { | ||
116 | // Allow `import type` in CommonJS TypeScript modules. | ||
117 | 'import/no-import-module-exports': 'off', | ||
118 | }, | ||
119 | }, | ||
120 | { | ||
111 | files: [ | 121 | files: [ |
112 | '.eslintrc.cjs', | 122 | '.eslintrc.cjs', |
113 | 'scripts/*.cjs', | 123 | 'scripts/*.cjs', |
@@ -132,5 +142,20 @@ module.exports = { | |||
132 | 'no-process-env': 'off', | 142 | 'no-process-env': 'off', |
133 | }, | 143 | }, |
134 | }, | 144 | }, |
145 | { | ||
146 | files: ['subprojects/docs/src/**/*'], | ||
147 | rules: { | ||
148 | 'import/no-unresolved': [ | ||
149 | 'error', | ||
150 | { | ||
151 | ignore: [ | ||
152 | // These imports are resolved by Docusaurus, not TypeScript. | ||
153 | '^@theme/', | ||
154 | '^@theme-original/', | ||
155 | ], | ||
156 | }, | ||
157 | ], | ||
158 | }, | ||
159 | }, | ||
135 | ], | 160 | ], |
136 | }; | 161 | }; |