You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@annotator.apache.org by ra...@apache.org on 2021/07/16 01:38:42 UTC

[incubator-annotator] branch main updated: Fix linter resolutions

This is an automated email from the ASF dual-hosted git repository.

randall pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-annotator.git


The following commit(s) were added to refs/heads/main by this push:
     new a352fff  Fix linter resolutions
a352fff is described below

commit a352fff9b9abda66d4627d4644ea5a2e2218d7c4
Author: Randall Leeds <ra...@apache.org>
AuthorDate: Thu Jul 15 17:59:00 2021 -0700

    Fix linter resolutions
    
    Restore the use of TypeScript project references to the TypeScript
    ESLint plugin. Move the optimal-select module declaration to the root of
    the dom package, where TypeScript will automatically find it. Disable
    the import/no-unresolved rule for TypeScript files because TypeScript
    itself will check that modules resolve.
---
 .eslintrc.js                                                            | 2 ++
 .../dom/{@types/optimal-select/index.d.ts => src/optimal-select.d.ts}   | 0
 packages/dom/tsconfig.json                                              | 2 +-
 3 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/.eslintrc.js b/.eslintrc.js
index fca1ba7..a48deed 100644
--- a/.eslintrc.js
+++ b/.eslintrc.js
@@ -108,9 +108,11 @@ module.exports = {
         ecmaVersion: 2020,
         project: ['./tsconfig.test.json', './packages/*/tsconfig.json'],
         tsconfigRootDir: __dirname,
+        EXPERIMENTAL_useSourceOfProjectReferenceRedirect: true,
       },
       plugins: ['@typescript-eslint'],
       rules: {
+        'import/no-unresolved': 'off',
         '@typescript-eslint/consistent-type-imports': 'error',
         '@typescript-eslint/no-duplicate-imports': 'error',
         '@typescript-eslint/no-explicit-any': 'off',
diff --git a/packages/dom/@types/optimal-select/index.d.ts b/packages/dom/src/optimal-select.d.ts
similarity index 100%
rename from packages/dom/@types/optimal-select/index.d.ts
rename to packages/dom/src/optimal-select.d.ts
diff --git a/packages/dom/tsconfig.json b/packages/dom/tsconfig.json
index e26d55e..02e0fcf 100644
--- a/packages/dom/tsconfig.json
+++ b/packages/dom/tsconfig.json
@@ -1,6 +1,6 @@
 {
   "extends": "../../tsconfig.base.json",
-  "include": ["src", "./@types"],
+  "include": ["src"],
   "compilerOptions": {
     "outDir": "lib",
     "rootDir": "src"