Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,8 @@
# listings staged files only
fileList=$(git diff --diff-filter=AM --cached --name-only)

npm run precommit $fileList
if [ -n "$fileList" ]; then
echo "Prettifying staged files..."
npx prettier-compass --write --ignore-unknown $fileList
git add $fileList
fi
File renamed without changes.
17,258 changes: 9,105 additions & 8,153 deletions THIRD-PARTY-NOTICES.md
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new precommit doesn't skip some of the root files anymore that it was missing before (hence the massive diff) and I think that before this was happening by mistake, so I'm not planning to restore this behavior in the new precommit hook code. This got updated because I did a merge from main to resolve a conflict

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions configs/eslint-config-compass/bin/eslint.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/usr/bin/env node
'use strict';
require('eslint/bin/eslint.js');
16 changes: 8 additions & 8 deletions configs/eslint-config-compass/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,35 +4,35 @@
"description": "Shared Compass eslint configuration",
"license": "SSPL",
"main": "index.js",
"bin": {
"eslint-compass": "./bin/eslint.js"
},
"files": [
"index.js",
"bin",
"package.json",
"README.md"
],
"peerDependencies": {
"eslint": "^7.25.0"
},
"dependencies": {
"@babel/core": "^7.21.4",
"@babel/eslint-parser": "^7.14.3",
"@mongodb-js/eslint-config-devtools": "^0.9.9",
"@mongodb-js/eslint-plugin-compass": "^1.2.6",
"@typescript-eslint/eslint-plugin": "^5.59.0",
"@typescript-eslint/parser": "^5.59.0",
"eslint": "^7.25.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-filename-rules": "^1.2.0",
"eslint-plugin-jsx-a11y": "^6.4.1",
"eslint-plugin-mocha": "^8.0.0",
"eslint-plugin-react": "^7.24.0",
"eslint-plugin-react-hooks": "^4.2.0"
},
"devDependencies": {
"prettier": "^2.7.1"
},
"scripts": {
"prettier": "prettier-compass",
"check": "npm run lint",
"lint": "prettier --check .",
"reformat": "prettier --write ."
"lint": "npm run prettier -- --check .",
"reformat": "npm run prettier -- --write ."
},
"repository": {
"type": "git",
Expand Down
3 changes: 0 additions & 3 deletions configs/eslint-plugin-compass/.prettierignore

This file was deleted.

1 change: 0 additions & 1 deletion configs/eslint-plugin-compass/.prettierrc.json

This file was deleted.

7 changes: 3 additions & 4 deletions configs/eslint-plugin-compass/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
"license": "SSPL",
"main": "index.js",
"scripts": {
"eslint": "eslint",
"prettier": "prettier",
"eslint": "eslint-compass",
"prettier": "prettier-compass",
"lint": "npm run eslint . && npm run prettier -- --check .",
"depcheck": "depcheck",
"check": "npm run lint && npm run depcheck",
Expand All @@ -42,7 +42,6 @@
"depcheck": "^1.4.1",
"eslint": "^7.25.0",
"mocha": "^10.2.0",
"nyc": "^15.1.0",
"prettier": "^2.7.1"
"nyc": "^15.1.0"
}
}
1 change: 0 additions & 1 deletion configs/mocha-config-compass/.prettierrc.json

This file was deleted.

5 changes: 2 additions & 3 deletions configs/mocha-config-compass/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,10 @@
"license": "SSPL",
"main": "index.js",
"devDependencies": {
"@mongodb-js/prettier-config-compass": "^1.2.6",
"prettier": "^2.7.1"
"@mongodb-js/prettier-config-compass": "^1.2.6"
},
"scripts": {
"prettier": "prettier",
"prettier": "prettier-compass",
"lint": "npm run prettier -- --check .",
"check": "npm run lint",
"check-ci": "npm run lint",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.nyc_output
.nyc-output
dist
coverage
1 change: 0 additions & 1 deletion configs/prettier-config-compass/.prettierrc.json

This file was deleted.

15 changes: 15 additions & 0 deletions configs/prettier-config-compass/bin/prettier.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/usr/bin/env node
'use strict';
const path = require('path');
const fs = require('fs');
if (process.argv.some((arg) => /^--(no-)?config/.test(arg))) {
throw new Error('--config option is not allowed');
}
process.argv.push('--config', path.resolve(__dirname, '..', 'index.js'));
if (!fs.existsSync(path.resolve(process.cwd(), '.prettierignore'))) {
process.argv.push(
'--ignore-path',
path.resolve(__dirname, '..', '.prettierignore-default')
);
}
require('prettier/bin-prettier.js');
9 changes: 6 additions & 3 deletions configs/prettier-config-compass/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,20 @@
"description": "Shared Compass prettier configuration",
"license": "SSPL",
"main": "index.js",
"bin": {
"prettier-compass": "./bin/prettier.js"
},
"peerDependencies": {
"prettier": "^2.7.1"
},
"devDependencies": {
"prettier": "^2.7.1",
"@mongodb-js/prettier-config-devtools": "^1.0.1"
},
"scripts": {
"prettier": "prettier-compass",
"check": "npm run lint",
"lint": "prettier --check .",
"reformat": "prettier --write ."
"lint": "npm run prettier -- --check .",
"reformat": "npm run prettier -- --write ."
},
"repository": {
"type": "git",
Expand Down
3 changes: 0 additions & 3 deletions configs/testing-library-compass/.prettierignore

This file was deleted.

1 change: 0 additions & 1 deletion configs/testing-library-compass/.prettierrc.json

This file was deleted.

6 changes: 2 additions & 4 deletions configs/testing-library-compass/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
"scripts": {
"compile": "tsc -p tsconfig.json",
"typecheck": "tsc -p tsconfig-lint.json --noEmit",
"eslint": "eslint",
"prettier": "prettier",
"eslint": "eslint-compass",
"prettier": "prettier-compass",
"lint": "npm run eslint . && npm run prettier -- --check .",
"depcheck": "depcheck",
"check": "npm run typecheck && npm run lint && npm run depcheck",
Expand All @@ -54,10 +54,8 @@
"@types/sinon-chai": "^3.2.5",
"chai": "^4.3.6",
"depcheck": "^1.4.1",
"eslint": "^7.25.0",
"mocha": "^10.2.0",
"nyc": "^15.1.0",
"prettier": "^2.7.1",
"typescript": "^5.0.4"
},
"dependencies": {
Expand Down
1 change: 0 additions & 1 deletion configs/tsconfig-compass/.prettierrc.json

This file was deleted.

3 changes: 1 addition & 2 deletions configs/tsconfig-compass/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@
"typescript": "^5.0.4"
},
"devDependencies": {
"@mongodb-js/prettier-config-compass": "^1.2.6",
"prettier": "^2.7.1"
"@mongodb-js/prettier-config-compass": "^1.2.6"
},
"dependencies": {
"@mongodb-js/tsconfig-devtools": "^1.0.0"
Expand Down
2 changes: 0 additions & 2 deletions configs/webpack-config-compass/.prettierignore

This file was deleted.

1 change: 0 additions & 1 deletion configs/webpack-config-compass/.prettierrc.json

This file was deleted.

6 changes: 2 additions & 4 deletions configs/webpack-config-compass/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@
"prepublishOnly": "npm run compile && compass-scripts check-exports-exist",
"compile": "tsc -p tsconfig.json",
"postcompile": "gen-esm-wrapper . ./dist/.esm-wrapper.mjs",
"eslint": "eslint",
"prettier": "prettier",
"eslint": "eslint-compass",
"prettier": "prettier-compass",
"lint": "npm run eslint . && npm run prettier -- --check .",
"depcheck": "depcheck",
"check": "npm run lint && npm run depcheck",
Expand All @@ -52,8 +52,6 @@
"@types/html-webpack-plugin": "^3.2.9",
"@types/webpack-bundle-analyzer": "^4.7.0",
"depcheck": "^1.4.1",
"eslint": "^7.25.0",
"prettier": "^2.7.1",
"typescript": "^5.0.4"
},
"dependencies": {
Expand Down
Loading
Loading