Skip to content

Commit

Permalink
Harmonize .prettierignore and .gitignore
Browse files Browse the repository at this point in the history
  • Loading branch information
dkarnutsch committed Jan 23, 2024
1 parent b13c2f3 commit d6622cb
Show file tree
Hide file tree
Showing 13 changed files with 102 additions and 11 deletions.
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
.idea

node_modules
.yarn
.npm
.babelCache
schema.graphql

.env.local
.env.secrets
14 changes: 12 additions & 2 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,17 @@
# Copy from .gitignore, remove once prettier v3 is in use
.idea

.npm
.babelCache

.env.local
.env.secrets

# Go Templates can not be formatted with prettier (https://github.com/prettier/prettier/issues/6517)
chart/*/templates/*

# Microservices are checked by each microservice on its own
admin/
api/
site/
schema.graphql
lang/
create-app/
5 changes: 5 additions & 0 deletions admin/.gitignore
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
.env
.env.local
.env.secrets

/node_modules

/build

/lang/
/lang-compiled/
/lang-extracted/

fragmentTypes.json
/schema.*

**/*.generated.ts
/block-meta.json
/comet-config.json
22 changes: 20 additions & 2 deletions admin/.prettierignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,25 @@
# Copy from .gitignore until prettier v3 is in use
.env
.env.local
.env.secrets

/node_modules

/build

/lang/
/lang-compiled/
/lang-extracted/

fragmentTypes.json
/schema.*

**/*.generated.ts
/block-meta.json
/comet-config.json

package-lock.json
.gitignore
*.lock
*.gql
*.dist
src/fragmentTypes.json
src/graphql.generated.ts
2 changes: 1 addition & 1 deletion admin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"lint": "npm run intl:compile && run-p gql:types generate-block-types && run-p lint:prettier lint:eslint lint:tsc",
"lint:eslint": "eslint --max-warnings 0 --ext .ts,.tsx,.js,.jsx,.json,.md src/ package.json",
"lint:tsc": "tsc --project .",
"lint:prettier": "npx prettier --check './**/*.{js,json,md,yml,yaml}' --ignore-path .gitignore",
"lint:prettier": "npx prettier --check './**/*.{js,json,md,yml,yaml}'",
"intl:extract": "formatjs extract \"src/**/*.ts*\" --ignore ./**.d.ts --out-file lang-extracted/en.json --format simple",
"intl:compile:comet": "formatjs compile-folder --format simple --ast lang/comet-lang lang-compiled/comet-lang",
"intl:compile:starter-admin": "formatjs compile-folder --format simple --ast lang/starter-lang/admin lang-compiled/starter-admin",
Expand Down
1 change: 1 addition & 0 deletions api/.gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# compiled output
/dist

/node_modules
.env
.env.local
Expand Down
3 changes: 2 additions & 1 deletion api/.prettierignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Copy from .gitignore until prettier v3 is in use
# compiled output
/dist

/node_modules
.env
.env.local
Expand Down Expand Up @@ -45,5 +47,4 @@ package-lock.json
*.lock
*.gql
*.dist
uploads/
block-meta.json
2 changes: 2 additions & 0 deletions create-app/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Copy from .gitignore until prettier v3 is in use
/lib
2 changes: 1 addition & 1 deletion create-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"clean": "rimraf lib",
"lint": "run-p lint:prettier lint:eslint lint:tsc",
"lint:eslint": "eslint --ext .ts,.tsx,.js,.jsx,.json --max-warnings 0 src/",
"lint:prettier": "npx prettier --check './**/*.{js,json,md,yml,yaml}' --ignore-path .gitignore",
"lint:prettier": "npx prettier --check './**/*.{js,json,md,yml,yaml}'",
"lint:tsc": "tsc --project ./tsconfig.json",
"prepublishOnly": "npm run lint && npm run build",
"prestart": "npm run clean",
Expand Down
2 changes: 1 addition & 1 deletion lint-staged.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ module.exports = {
"site/**/*.{js,json,md,yml,yaml}": () => "npm --prefix site run lint:prettier",
"create-app/src/**/*.{ts,tsx,js,jsx,json,css,scss,md}": () => "npm --prefix create-app run lint:eslint",
"create-app/**/*.{ts,tsx}": () => "npm --prefix create-app run lint:tsc",
"create-app/**/*.{js,json,md,yml,yaml}": () => "npm --prefix site create-app lint:prettier",
"create-app/**/*.{js,json,md,yml,yaml}": () => "npm --prefix create-app run lint:prettier",
"./**/*.{js,json,md,yml,yaml}": () => "npm run lint:root",
};
1 change: 1 addition & 0 deletions site/.gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
# Lang files
/lang-compiled/
/lang-extracted/
/lang/
Expand Down
53 changes: 53 additions & 0 deletions site/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
# Lang files
/lang-compiled/
/lang-extracted/
/lang/

# dependencies
/node_modules
/.pnp
.pnp.js

# testing
/coverage

# next.js
/.next/
/out/

# production
/build
/preBuild/build

# misc
.DS_Store
*.pem

# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# local env files
.env.local
.env.secrets
.env.development.local
.env.test.local
.env.production.local

# vercel
.vercel

.env
schema.gql
schema.json
block-meta.json
src/**/*.generated.ts
preBuild/**/*.generated.ts
comet-config.json

public/sitemap.xml
public/robots.txt

tsconfig.tsbuildinfo
2 changes: 1 addition & 1 deletion site/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"clear:preBuild": "rimraf preBuild/build",
"lint": "npm run intl:compile && run-p gql:types generate-block-types && run-p lint:prettier lint:eslint lint:tsc",
"lint:eslint": "eslint --max-warnings 0 --config ./.eslintrc.cli.js --ext .ts,.tsx,.js,.jsx,.json,.md src/ package.json",
"lint:prettier": "npx prettier --check './**/*.{js,json,md,yml,yaml}' --ignore-path .gitignore",
"lint:prettier": "npx prettier --check './**/*.{js,json,md,yml,yaml}'",
"lint:tsc": "tsc --project .",
"lint:tscPreBuild": "tsc --project tsconfig.preBuild.json",
"generate-block-types": "comet generate-block-types",
Expand Down

0 comments on commit d6622cb

Please sign in to comment.