π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Share the eslint config
Manav Rathia00f64eaa9ff
diff --git a/docs/dev.md b/docs/dev.mdindex e016c70cdf..2949b3f357 100644--- a/docs/dev.md+++ b/docs/dev.md@@ -32,8 +32,3 @@ To see what packages depend on each other locally, use```shyarn workspaces info```--## Tips--- Too see what tsc is seeing (say when it is trying to type-check `@/utils`),- use `yarn workspace @/utils tsc --showConfig`.diff --git a/packages/build-config/README.md b/packages/build-config/README.mdindex 512cac273a..8e62b1b3d2 100644--- a/packages/build-config/README.md+++ b/packages/build-config/README.md@@ -7,3 +7,16 @@ exports various config files that our packages use at build time.This is _not_ a TypeScript package, nor is it linted. It is not meant to betranspiled, it just exports static files that can be included verbatim.++### Debugging++Too see what tsc is seeing (say when it is trying to type-check `@/utils`), use+`yarn workspace @/utils tsc --showConfig`.++Similarly, to verify what ESLint is trying to do, use `yarn workspace @/utils+eslint --debug .`++If the issue is in VSCode, open the output window of the corresponding plugin,+it might be telling us what's going wrong there. In particular, when changing+the settings here, you might need to "Developer: Reload Window" in VSCode to get+it to pick up the changes.diff --git a/packages/build-config/eslintrc-typescript.js b/packages/build-config/eslintrc-typescript.jsnew file mode 100644index 0000000000..2c085c1816--- /dev/null+++ b/packages/build-config/eslintrc-typescript.js@@ -0,0 +1,13 @@+module.exports = {+ extends: [+ 'eslint:recommended',+ 'plugin:@typescript-eslint/recommended-type-checked',+ ],+ plugins: ['@typescript-eslint'],+ parser: '@typescript-eslint/parser',+ parserOptions: {+ project: true,+ },+ ignorePatterns: ['.eslintrc.js'],+ root: true,+};diff --git a/packages/build-config/eslintrc.typescript.js b/packages/build-config/eslintrc.typescript.jsdeleted file mode 100644index 60e7ac2309..0000000000--- a/packages/build-config/eslintrc.typescript.js+++ /dev/null@@ -1,15 +0,0 @@-/* eslint-env node */-module.exports = {- extends: [- "eslint:recommended",- "plugin:@typescript-eslint/recommended-type-checked",- ],- plugins: ["@typescript-eslint"],- parser: "@typescript-eslint/parser",- parserOptions: {- project: true,- tsconfigRootDir: __dirname,- },- ignorePatterns: [".eslintrc.js"],- root: true,-};diff --git a/packages/ui/.eslintrc.js b/packages/ui/.eslintrc.jsindex 60e7ac2309..a9a3393e03 100644--- a/packages/ui/.eslintrc.js+++ b/packages/ui/.eslintrc.js@@ -1,15 +1,6 @@-/* eslint-env node */module.exports = {- extends: [- "eslint:recommended",- "plugin:@typescript-eslint/recommended-type-checked",- ],- plugins: ["@typescript-eslint"],- parser: "@typescript-eslint/parser",+ extends: ["@/build-config/eslintrc-typescript"],parserOptions: {- project: true,tsconfigRootDir: __dirname,},- ignorePatterns: [".eslintrc.js"],- root: true,};diff --git a/packages/ui/README.md b/packages/ui/README.mdindex 265baa1aa6..69c0a71e22 100644--- a/packages/ui/README.md+++ b/packages/ui/README.md@@ -4,5 +4,5 @@ Like [@/utils](../utils/README.md), but for things that require React.### Packaging-This (internal) package exports a vanilla TypeScript library. We rely on the+This (internal) package exports a React TypeScript library. We rely on theimporting project to transpile and bundle it.diff --git a/packages/utils/.eslintrc.js b/packages/utils/.eslintrc.jsindex 60e7ac2309..a9a3393e03 100644--- a/packages/utils/.eslintrc.js+++ b/packages/utils/.eslintrc.js@@ -1,15 +1,6 @@-/* eslint-env node */module.exports = {- extends: [- "eslint:recommended",- "plugin:@typescript-eslint/recommended-type-checked",- ],- plugins: ["@typescript-eslint"],- parser: "@typescript-eslint/parser",+ extends: ["@/build-config/eslintrc-typescript"],parserOptions: {- project: true,tsconfigRootDir: __dirname,},- ignorePatterns: [".eslintrc.js"],- root: true,};