Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🏗️ Ignore .babel-cache directory #33449

Merged
merged 3 commits into from
Mar 24, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ dist.tools/**
firebase/**
out/**
test/coverage/**
.babel-cache/**

# Code directories
build-system/tasks/visual-diff/snippets/*.js
Expand Down
10 changes: 8 additions & 2 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,8 @@
package.json
package-lock.json
.babel-cache/**
.github/ISSUE_TEMPLATE/**
**/package*.json
**/node_modules/**
**/build/**
**/dist/**
**/dist.3p/**
**/dist.tools/**
6 changes: 5 additions & 1 deletion build-system/tasks/prettify.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ const {
logOnSameLineLocalDev,
logWithoutTimestamp,
} = require('../common/logging');
const {default: ignore} = require('ignore');
const {exec} = require('../common/exec');
const {getFilesToCheck} = require('../common/utils');
const {green, cyan, red, yellow} = require('kleur/colors');
Expand All @@ -46,7 +47,10 @@ const tempDir = tempy.directory();
* Checks files for formatting (and optionally fixes them) with Prettier.
*/
async function prettify() {
const filesToCheck = getFilesToCheck(prettifyGlobs, {dot: true});
const ignored = ignore().add(fs.readFileSync('.prettierignore', 'utf8'));
const filesToCheck = ignored.filter(
getFilesToCheck(prettifyGlobs, {dot: true})
jridgewell marked this conversation as resolved.
Show resolved Hide resolved
);
if (filesToCheck.length == 0) {
return;
}
Expand Down
3 changes: 0 additions & 3 deletions build-system/test-configs/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -176,9 +176,6 @@ const prettifyGlobs = [
'**/*.json',
'**/OWNERS',
'**/*.md',
'!**/package*.json',
'!.github/ISSUE_TEMPLATE/**',
'!**/{node_modules,build,dist,dist.3p,dist.tools}/**',
];

/**
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@
"globby": "11.0.2",
"gulp-connect": "5.7.0",
"html-minifier": "4.0.0",
"ignore": "5.1.8",
"istanbul-middleware": "0.2.2",
"jest-dot-reporter": "1.0.12",
"jest-silent-reporter": "0.5.0",
Expand Down