Skip to content

Commit

Permalink
Merge pull request #18642 from storybookjs/future/improve-linting-a-bit
Browse files Browse the repository at this point in the history
Future - improve linting a bit
  • Loading branch information
ndelangen authored Jul 6, 2022
2 parents dee7788 + 8c0d7be commit c70361f
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 12 deletions.
1 change: 1 addition & 0 deletions lib/ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@
"react-helmet-async": "^1.0.7",
"react-sizeme": "^3.0.1",
"resolve-from": "^5.0.0",
"shelljs": "^0.8.5",
"store2": "^2.12.0",
"ts-dedent": "^2.0.0",
"typescript": "~4.6.3",
Expand Down
16 changes: 5 additions & 11 deletions lib/ui/scripts/generate-exports-file.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
/* eslint-disable camelcase */
/* eslint-disable no-console */
import fs from 'fs-extra';
import path from 'path';
import child_process from 'child_process';
import shelljs from 'shelljs';
import { dedent } from 'ts-dedent';

const remove = (regex?: RegExp) => (input: string) =>
Expand Down Expand Up @@ -30,15 +29,10 @@ const run = async () => {
);

console.log('Linting...');
child_process.exec(
`yarn lint:js:cmd --fix ${location}`,
{
cwd: path.join(__dirname, '..', '..', '..'),
},
() => {
console.log('Done!');
}
);
shelljs.exec(`yarn lint:js:cmd --fix ${location}`, {
cwd: path.join(__dirname, '..', '..', '..'),
});
console.log('Done!');
};

run().catch((e) => {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
"linear-export": "ts-node --project=./scripts/tsconfig.json ./scripts/linear-export.ts",
"lint": "yarn lint:js && yarn lint:md",
"lint:ejs": "ejslint **/*.ejs",
"lint:js": "yarn lint:js:cmd .",
"lint:js": "yarn lint:js:cmd . --quiet",
"lint:js:cmd": "cross-env NODE_ENV=production eslint --cache --cache-location=.cache/eslint --ext .js,.jsx,.json,.html,.ts,.tsx,.mjs --report-unused-disable-directives",
"lint:md": "remark -q .",
"lint:package": "sort-package-json",
Expand Down
1 change: 1 addition & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -9877,6 +9877,7 @@ __metadata:
react-helmet-async: ^1.0.7
react-sizeme: ^3.0.1
resolve-from: ^5.0.0
shelljs: ^0.8.5
store2: ^2.12.0
ts-dedent: ^2.0.0
typescript: ~4.6.3
Expand Down

0 comments on commit c70361f

Please sign in to comment.