This repository was archived by the owner on Aug 7, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -168,6 +168,10 @@ export function refreshModulesPath(modulesDir) {
168
168
}
169
169
170
170
function getProjectDir ( filePath ) {
171
+ if ( ! filePath ) {
172
+ // No file (e.g. in the specs)
173
+ return null ;
174
+ }
171
175
const projectDir = atom . project . relativizePath ( filePath ) [ 0 ] ;
172
176
return projectDir !== null ? projectDir : path . dirname ( filePath ) ;
173
177
}
Original file line number Diff line number Diff line change @@ -7,7 +7,6 @@ import hasValidScope from './validate';
7
7
// Dependencies
8
8
let helpers ;
9
9
let dirname ;
10
- let stylelint ;
11
10
12
11
function loadDeps ( ) {
13
12
if ( ! helpers ) {
@@ -16,9 +15,6 @@ function loadDeps() {
16
15
if ( ! dirname ) {
17
16
( { dirname } = require ( 'path' ) ) ;
18
17
}
19
- if ( ! stylelint ) {
20
- stylelint = require ( 'stylelint' ) ;
21
- }
22
18
}
23
19
24
20
export default {
@@ -156,6 +152,8 @@ export default {
156
152
}
157
153
158
154
helpers . startMeasure ( 'linter-stylelint: Create Linter' ) ;
155
+ // Use the project local stylelint to resolve the config if one exists
156
+ const stylelint = await helpers . getStylelintInstance ( ) ;
159
157
const stylelintLinter = await stylelint . createLinter ( ) ;
160
158
helpers . endMeasure ( 'linter-stylelint: Create Linter' ) ;
161
159
You can’t perform that action at this time.
0 commit comments