File tree 5 files changed +14
-7
lines changed
5 files changed +14
-7
lines changed Original file line number Diff line number Diff line change 1
- import { Command } from 'commander' ;
2
- import { test } from '@lg-tools/test' ;
3
1
import { lint } from '@lg-tools/lint' ;
2
+ import { test } from '@lg-tools/test' ;
3
+ import { Command } from 'commander' ;
4
4
5
5
const cli = new Command ( 'lg' ) ;
6
6
Original file line number Diff line number Diff line change
1
+ /* eslint-disable no-console */
2
+ import chalk from 'chalk' ;
1
3
import { spawn } from 'child_process' ;
2
4
import path from 'path' ;
3
- import chalk from 'chalk' ;
5
+
4
6
import { LintCommandOptions } from './lint.types' ;
5
7
6
8
const rootDir = process . cwd ( ) ;
Original file line number Diff line number Diff line change 1
1
/* eslint-disable no-console */
2
- import { npmPkgJsonLint } from './npmPkgJsonLint' ;
3
-
4
2
import { eslint } from './eslint' ;
5
3
import { LintCommandOptions } from './lint.types' ;
4
+ import { npmPkgJsonLint } from './npmPkgJsonLint' ;
6
5
import { prettier } from './prettier' ;
7
6
8
7
export const lint = ( options : LintCommandOptions ) => {
@@ -13,9 +12,11 @@ export const lint = (options: LintCommandOptions) => {
13
12
if ( ! prettierOnly && ! pkgJsonOnly ) {
14
13
linters . push ( eslint ( { fix, verbose } ) ) ;
15
14
}
15
+
16
16
if ( ! eslintOnly && ! pkgJsonOnly ) {
17
17
linters . push ( prettier ( { fix, verbose } ) ) ;
18
18
}
19
+
19
20
if ( ! prettierOnly && ! eslintOnly ) {
20
21
linters . push ( npmPkgJsonLint ( { fix, verbose } ) ) ;
21
22
}
Original file line number Diff line number Diff line change 1
- import { spawn } from 'child_process' ;
1
+ /* eslint-disable no-console */
2
2
import chalk from 'chalk' ;
3
+ import { spawn } from 'child_process' ;
3
4
import path from 'path' ;
5
+
4
6
import { LintCommandOptions } from './lint.types' ;
5
7
// import { NpmPackageJsonLint } from 'npm-package-json-lint';
6
8
const rootDir = process . cwd ( ) ;
Original file line number Diff line number Diff line change
1
+ /* eslint-disable no-console */
2
+ import chalk from 'chalk' ;
1
3
import { spawn } from 'child_process' ;
2
4
import path from 'path' ;
3
- import chalk from 'chalk' ;
5
+
4
6
import { esLintExtensions } from './eslint' ;
5
7
import { LintCommandOptions } from './lint.types' ;
6
8
You can’t perform that action at this time.
0 commit comments