Skip to content

Commit

Permalink
remove automatic update of configBasedir option
Browse files Browse the repository at this point in the history
thanks to this commit: stylelint/stylelint@c1e9894
  • Loading branch information
shinnn committed Nov 15, 2016
1 parent a0799de commit f481487
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions server.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ const langServer = require('vscode-languageserver');
const Files = langServer.Files;
const stylelintVSCode = require('stylelint-vscode');

let configBasedir;
let config;
let configOverrides;

Expand All @@ -19,7 +18,6 @@ function validate(document) {
codeFilename: Files.uriToFilePath(document.uri),
config,
configOverrides,
configBasedir,
syntax: supportedCustomSyntaxes.has(document.languageId) ? document.languageId : null
}).then(diagnostics => {
connection.sendDiagnostics({uri: document.uri, diagnostics});
Expand All @@ -43,11 +41,7 @@ function validateAll() {
return Promise.all(documents.all().map(document => validate(document)));
}

connection.onInitialize(params => {
if (params.rootPath) {
configBasedir = params.rootPath;
}

connection.onInitialize(() => {
validateAll();

return {
Expand All @@ -57,7 +51,7 @@ connection.onInitialize(params => {
};
});
connection.onDidChangeConfiguration(params => {
const settings = params.settings;
const {settings} = params;
config = settings.stylelint.config;
configOverrides = settings.stylelint.configOverrides;

Expand Down

0 comments on commit f481487

Please sign in to comment.