Commit b6267b5a authored by ι™ˆεΈ…'s avatar ι™ˆεΈ…

support pretier info ignored

parent 7b77a0d7
......@@ -99,7 +99,7 @@
"puppeteer": "^1.10.0"
},
"lint-staged": {
"**/*.{js,jsx,less}": [
"**/*.{js,ts,tsx,json,jsx,less}": [
"node ./scripts/lint-prettier.js",
"git add"
],
......
......@@ -22,6 +22,9 @@ files.forEach(file => {
});
try {
const fileInfo = prettier.getFileInfo.sync(file);
if (fileInfo.ignored) {
return;
}
const input = fs.readFileSync(file, 'utf8');
const withParserOptions = {
...options,
......
......@@ -27,6 +27,9 @@ files.forEach(file => {
config: prettierConfigPath,
});
const fileInfo = prettier.getFileInfo.sync(file);
if (fileInfo.ignored) {
return;
}
try {
const input = fs.readFileSync(file, 'utf8');
const withParserOptions = {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment