mirror of
https://github.com/HackPlan/polaris-react.git
synced 2026-04-29 17:55:57 +08:00
Widen reach of linting scripts and fix linting errors (#1970)
* Format various files * Wider reaching lint/format The autoformat tools should format the same files you should run into in your editor. Previously we weren't catching js files, json files and any ts files outside the src folder. Update lint:js command to include the whole folder, not just src Update format:prettier command to include json files. Fix linting issues raised by checking more files.
This commit is contained in:
committed by
GitHub
parent
edd424216e
commit
a57d64b733
@@ -1,3 +1,5 @@
|
||||
/* eslint-disable no-console */
|
||||
|
||||
import {cp, mkdir, rm} from 'shelljs';
|
||||
import {resolve} from 'path';
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
/* eslint-disable no-console */
|
||||
|
||||
require('isomorphic-fetch');
|
||||
|
||||
const {resolve} = require('path');
|
||||
|
||||
@@ -25,7 +25,10 @@ function optimizeFile(file) {
|
||||
svgo.optimize(data, (result) => {
|
||||
removeSync(file);
|
||||
|
||||
const newFile = resolvePath(dirname(file), `${paramCase(basename(file, '.svg'))}.svg`);
|
||||
const newFile = resolvePath(
|
||||
dirname(file),
|
||||
`${paramCase(basename(file, '.svg'))}.svg`,
|
||||
);
|
||||
writeFileSync(newFile, `${result.data}\n`);
|
||||
resolve();
|
||||
});
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
{
|
||||
"extends": "../tsconfig.json",
|
||||
"exclude": [
|
||||
"../src/**/*.test.ts",
|
||||
"../src/**/*.test.tsx"
|
||||
]
|
||||
"exclude": ["../src/**/*.test.ts", "../src/**/*.test.tsx"]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user