-
Notifications
You must be signed in to change notification settings - Fork 166
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Build for a more modern target (#1286)
* move in bundling changes from pr/load-error-messages * some more eslint adjustments * typecheck js * changeset * disable `checkJs` for now --------- Co-authored-by: Jerel Miller <jerelmiller@gmail.com>
- Loading branch information
1 parent
3f60ac7
commit 11309f3
Showing
14 changed files
with
384 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"apollo-client-devtools": minor | ||
--- | ||
|
||
Change transpilation target to create a smaller and more modern DevTools build. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
{ | ||
"editor.formatOnSave": true, | ||
"typescript.tsdk": "node_modules/typescript/lib" | ||
"typescript.tsdk": "node_modules/typescript/lib", | ||
"eslint.experimental.useFlatConfig": true, | ||
"eslint.workingDirectories": ["./*"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
import eslint from "@eslint/js"; | ||
import tseslint from "typescript-eslint"; | ||
import testingLibrary from "eslint-plugin-testing-library"; | ||
import reactRecommended from "eslint-plugin-react/configs/recommended.js"; | ||
import jsxRuntime from "eslint-plugin-react/configs/jsx-runtime.js"; | ||
import hooksPlugin from "eslint-plugin-react-hooks"; | ||
import globals from "globals"; | ||
|
||
export default tseslint.config( | ||
eslint.configs.recommended, | ||
...tseslint.configs.recommended, | ||
reactRecommended, | ||
jsxRuntime, | ||
{ | ||
plugins: { | ||
"testing-library": testingLibrary, | ||
}, | ||
rules: testingLibrary.configs.react.rules, | ||
}, | ||
{ | ||
plugins: { | ||
"react-hooks": hooksPlugin, | ||
}, | ||
// @ts-expect-error waiting for https://github.com/facebook/react/issues/28313 | ||
rules: hooksPlugin.configs.recommended.rules, | ||
}, | ||
// original config contained a reference to jest-dom, but didn't configure any rules - skipping | ||
{ | ||
languageOptions: { | ||
ecmaVersion: 2022, | ||
sourceType: "module", | ||
globals: { | ||
...globals.browser, | ||
...globals.node, | ||
...globals.webextensions, | ||
}, | ||
}, | ||
rules: { | ||
"react/prop-types": 0, | ||
"react/no-unknown-property": "error", | ||
"react/display-name": "off", | ||
"testing-library/no-node-access": "off", | ||
"@typescript-eslint/no-explicit-any": "warn", | ||
"@typescript-eslint/no-unused-vars": [ | ||
"warn", | ||
{ ignoreRestSiblings: true }, | ||
], | ||
"@typescript-eslint/consistent-type-imports": [ | ||
"error", | ||
{ | ||
prefer: "type-imports", | ||
disallowTypeAnnotations: false, | ||
fixStyle: "separate-type-imports", | ||
}, | ||
], | ||
}, | ||
settings: { | ||
react: { | ||
version: "detect", | ||
}, | ||
}, | ||
} | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.