From f862867a07fb09085a28bf134eb42276fde26540 Mon Sep 17 00:00:00 2001 From: Kristóf Marussy Date: Mon, 8 Apr 2024 16:20:58 +0200 Subject: docs: add Docusaurus website Also refactor Yarn buildscripts. --- .eslintrc.cjs | 29 +++++++++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) (limited to '.eslintrc.cjs') 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'); // Allow the Codium ESLint plugin to find `tsconfig.json` from the repository root. const project = [ path.join(__dirname, 'tsconfig.json'), + path.join(__dirname, 'subprojects/docs/tsconfig.json'), path.join(__dirname, 'subprojects/frontend/tsconfig.json'), path.join(__dirname, 'subprojects/frontend/tsconfig.node.json'), path.join(__dirname, 'subprojects/frontend/tsconfig.shared.json'), @@ -48,8 +49,10 @@ module.exports = { ignorePatterns: [ 'build/**/*', 'subprojects/*/build/**/*', - 'subprojects/*/dev-dist/**/*', - 'subprojects/*/src/**/*.typegen.ts', + 'subprojects/docs/.docusaurus/**/*', + 'subprojects/docs/.yarn/**/*', + 'subprojects/frontend/dev-dist/**/*', + 'subprojects/frontend/src/**/*.typegen.ts', ], rules: { // In typescript, some class methods implementing an inderface do not use `this`: @@ -107,6 +110,13 @@ module.exports = { '@typescript-eslint/no-var-requires': 'off', }, }, + { + files: ['*.cts'], + rules: { + // Allow `import type` in CommonJS TypeScript modules. + 'import/no-import-module-exports': 'off', + }, + }, { files: [ '.eslintrc.cjs', @@ -132,5 +142,20 @@ module.exports = { 'no-process-env': 'off', }, }, + { + files: ['subprojects/docs/src/**/*'], + rules: { + 'import/no-unresolved': [ + 'error', + { + ignore: [ + // These imports are resolved by Docusaurus, not TypeScript. + '^@theme/', + '^@theme-original/', + ], + }, + ], + }, + }, ], }; -- cgit v1.2.3-54-g00ecf