Skip to content

Commit 2ab0092

Browse files
fix(boilerplate): simplify ESLint config (#2883 by @coolsoftwaretyler)
* fix: drop eslint plugin n * fix: drop eslint standard as well * chore: remove duplicative script * ci: swap command in test * ci: revert * fix: update command name in new
1 parent debbcc8 commit 2ab0092

File tree

4 files changed

+3
-14
lines changed

4 files changed

+3
-14
lines changed

boilerplate/.eslintrc.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
// https://docs.expo.dev/guides/using-eslint/
22
module.exports = {
33
extends: [
4-
"standard",
54
"plugin:@typescript-eslint/recommended",
65
"plugin:react/recommended",
76
"plugin:react-native/all",

boilerplate/package.json

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
"main": "App.tsx",
66
"scripts": {
77
"compile": "tsc --noEmit -p . --pretty",
8-
"format": "eslint . --fix",
98
"lint": "eslint . --fix",
109
"lint:check": "eslint .",
1110
"patch": "patch-package",
@@ -76,10 +75,7 @@
7675
"eslint": "^8.57.0",
7776
"eslint-config-expo": "~8.0.1",
7877
"eslint-config-prettier": "^9.1.0",
79-
"eslint-config-standard": "^17.1.0",
80-
"eslint-plugin-n": "^17.10.2",
8178
"eslint-plugin-prettier": "^5.2.1",
82-
"eslint-plugin-promise": "^7.1.0",
8379
"eslint-plugin-react-native": "^4.1.0",
8480
"eslint-plugin-reactotron": "^0.1.2",
8581
"jest": "^29.2.1",

src/commands/new.ts

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -750,18 +750,12 @@ module.exports = {
750750
// do base install
751751
const installCmd = packager.installCmd({ packagerName })
752752
await system.run(installCmd, { onProgress: log })
753-
// If they chose npm and also Expo Router, we need to run npm install ajv@^8 --legacy-peer-deps.
754-
// see https://github.com/infinitered/ignite/issues/2840
755-
if (packagerName === "npm" && experimentalExpoRouter) {
756-
await system.run(`npm install ajv@^8 --legacy-peer-deps`, { onProgress: log })
757-
}
758753
// now that expo is installed, we can run their install --fix for best Expo SDK compatibility
759754
// for right now, we don't do this in CI because it returns a non-zero exit code
760755
// see https://docs.expo.dev/more/expo-cli/#version-validation
761756
if (process.env.CI !== "true") {
762-
const forwardOptions = packagerName === "npm" ? " -- --legacy-peer-deps" : ""
763757
log("Running `npx expo install --fix...`")
764-
await system.run(`npx expo install --fix${forwardOptions}`, { onProgress: log })
758+
await system.run(`npx expo install --fix`, { onProgress: log })
765759
}
766760

767761
stopSpinner(unboxingMessage, "🧶")
@@ -897,7 +891,7 @@ module.exports = {
897891
startSpinner(formattingMessage)
898892
if (installDeps === true) {
899893
// Make sure all our modifications are formatted nicely
900-
await packager.run("format", { ...packagerOptions })
894+
await packager.run("lint", { ...packagerOptions })
901895
} else {
902896
// if our linting configuration is not installed, try format
903897
// using prettier to make sure it's reasonably close, but this will skip

src/tools/packager.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ function installCmd(options: PackageRunOptions) {
146146
} else if (options.packagerName === "yarn") {
147147
return `yarn install${silent}`
148148
} else if (options.packagerName === "npm") {
149-
return `npm install${silent} --legacy-peer-deps`
149+
return `npm install${silent}`
150150
} else if (options.packagerName === "bun") {
151151
return `bun install${silent}`
152152
} else {

0 commit comments

Comments
 (0)