Skip to content

Commit

Permalink
chore(v2): fix ignore paths and Prettier commands in themes (#3865)
Browse files Browse the repository at this point in the history
* chore(v2): fix Prettier ignore paths and commands in themes

* chore(ci): do not ignore v1 lib, remove old .gitignore

* chore(ci): apply tweaks also to eslint ignore
  • Loading branch information
Simek authored Dec 3, 2020
1 parent d61754b commit f37987f
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 58 deletions.
23 changes: 5 additions & 18 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,26 +9,13 @@ jest.transform.js
website-1.x/
website/
scripts
packages/docusaurus-1.x/lib/core/metadata.js
packages/docusaurus-1.x/lib/core/MetadataBlog.js
packages/docusaurus-1.x/lib/core/__tests__/split-tab.test.js
packages/docusaurus-utils/lib/
packages/docusaurus-utils-validation/lib/

packages/docusaurus/lib/
packages/docusaurus-init/lib/
packages/docusaurus-plugin-client-redirects/lib/
packages/docusaurus-plugin-content-blog/lib/
packages/docusaurus-plugin-content-docs/lib/
packages/docusaurus-plugin-content-pages/lib/
packages/docusaurus-plugin-debug/lib/
packages/docusaurus-plugin-sitemap/lib/
packages/docusaurus-plugin-ideal-image/lib/
packages/docusaurus-*/lib/*
!packages/docusaurus-1.x/lib/*
packages/docusaurus-1.x/lib/core/__tests__/split-tab.test.js
packages/docusaurus-*/lib-next/
packages/docusaurus-plugin-ideal-image/copyUntypedFiles.js
packages/docusaurus-theme-common/lib/
packages/docusaurus-theme-classic/lib/
packages/docusaurus-theme-classic/lib-next/
packages/docusaurus-theme-bootstrap/lib/
packages/docusaurus-migrate/lib/

packages/docusaurus-1.x/.eslintrc.js
packages/docusaurus-init/templates/facebook/.eslintrc.js
Expand Down
19 changes: 4 additions & 15 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,22 +17,11 @@ coverage
.cache-loader
types
test-website
packages/docusaurus-utils/lib/
packages/docusaurus-utils-validation/lib/

packages/docusaurus/lib/
packages/docusaurus-init/lib/
packages/docusaurus-plugin-client-redirects/lib/
packages/docusaurus-plugin-content-blog/lib/
packages/docusaurus-plugin-content-docs/lib/
packages/docusaurus-plugin-content-pages/lib/
packages/docusaurus-plugin-debug/lib/
packages/docusaurus-plugin-sitemap/lib/
packages/docusaurus-plugin-ideal-image/lib/
packages/docusaurus-theme-common/lib/
packages/docusaurus-theme-classic/lib/
packages/docusaurus-theme-classic/lib-next/
packages/docusaurus-theme-bootstrap/lib/
packages/docusaurus-migrate/lib/
packages/docusaurus-*/lib/*
!packages/docusaurus-1.x/lib/*
packages/docusaurus-*/lib-next/

website/netlifyDeployPreview/*
!website/netlifyDeployPreview/index.html
Expand Down
16 changes: 3 additions & 13 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,9 @@ node_modules
build
coverage
.docusaurus
packages/docusaurus-utils/lib/
packages/docusaurus-utils-validation/lib/
packages/docusaurus/lib/
packages/docusaurus-init/lib/
packages/docusaurus-plugin-client-redirects/lib/
packages/docusaurus-*/lib/*
!packages/docusaurus-1.x/lib/*
packages/docusaurus-*/lib-next/
packages/docusaurus-init/templates/**/*.md
packages/docusaurus-plugin-content-blog/lib/
packages/docusaurus-plugin-content-docs/lib/
packages/docusaurus-plugin-content-pages/lib/
packages/docusaurus-plugin-debug/lib/
packages/docusaurus-plugin-sitemap/lib/
packages/docusaurus-plugin-ideal-image/lib/
packages/docusaurus-migrate/lib/
packages/docusaurus-theme-common/lib/
packages/docusaurus-theme-classic/lib/
__fixtures__
10 changes: 0 additions & 10 deletions packages/docusaurus-1.x/.gitignore

This file was deleted.

2 changes: 1 addition & 1 deletion packages/docusaurus-theme-bootstrap/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"build": "tsc --noEmit && yarn babel && yarn prettier",
"watch": "yarn babel --watch",
"babel": "babel src -d lib --extensions \".tsx,.ts\" --ignore \"**/*.d.ts\" --copy-files",
"prettier": "prettier --config ../../.prettierrc --write \"**/*.{js,ts}\""
"prettier": "prettier --config ../../.prettierrc --ignore-path ../../.prettierignore --write \"**/*.{js,ts}\""
},
"peerDependencies": {
"react": "^16.8.4",
Expand Down
2 changes: 1 addition & 1 deletion packages/docusaurus-theme-classic/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"watch": "yarn babel:lib --watch",
"babel:lib": "cross-env BABEL_ENV=lib babel src -d lib --extensions \".tsx,.ts\" --ignore \"**/*.d.ts\" --copy-files",
"babel:lib-next": "cross-env BABEL_ENV=lib-next babel src -d lib-next --extensions \".tsx,.ts\" --ignore \"**/*.d.ts\" --copy-files",
"prettier": "prettier --config ../../.prettierrc --write \"**/*.{js,ts}\""
"prettier": "prettier --config ../../.prettierrc --ignore-path ../../.prettierignore --write \"**/*.{js,ts}\""
},
"dependencies": {
"@docusaurus/core": "2.0.0-alpha.69",
Expand Down

0 comments on commit f37987f

Please sign in to comment.