Skip to content

Commit

Permalink
chore: update dependencies (#228)
Browse files Browse the repository at this point in the history
* chore: update vscode-uri to 3.x

* chore: upgrade to typescript 4.4.3

* chore: update lock file

stylelint is now at 13.7.2

* chore: update eslint config

* chore: update vscode types

* chore: remove unnecessary option passed to eslint

* chore: have dependabot ignore p-wait-for major ver
  • Loading branch information
adalinesimonian committed Sep 24, 2021
1 parent 788292f commit 439c102
Show file tree
Hide file tree
Showing 10 changed files with 3,721 additions and 3,713 deletions.
32 changes: 11 additions & 21 deletions .eslintrc.js
@@ -1,29 +1,19 @@
'use strict';

module.exports = {
extends: ['stylelint', 'prettier'],
/** @type {import('eslint').Linter.Config} */
const config = {
extends: ['stylelint', 'plugin:node/recommended', 'prettier'],
parserOptions: {
ecmaVersion: 2020,
sourceType: 'script',
},
env: {
node: true,
es2020: true,
},
rules: {
'node/no-missing-require': [
'error',
{
allowModules: ['vscode'],
},
],
'node/no-unpublished-require': [
'error',
{
allowModules: ['p-wait-for'],
},
],
'node/no-unsupported-features/node-builtins': [
'error',
{
version: '>=14.16.0',
ignores: [],
},
],
'node/no-missing-require': ['error', { allowModules: ['vscode'] }],
},
};

module.exports = config;
3 changes: 3 additions & 0 deletions .github/dependabot.yml
Expand Up @@ -8,3 +8,6 @@ updates:
versioning-strategy: increase
labels:
- 'pr: dependencies'
ignore:
- dependency-name: p-wait-for
update-types: [version-update:semver-major]
4 changes: 3 additions & 1 deletion index.js
Expand Up @@ -126,7 +126,9 @@ exports.activate = ({ subscriptions }) => {
};
const params = {
command: 'stylelint.applyAutoFix',
arguments: [textDocument],
// https://github.com/microsoft/TypeScript/issues/43362
/* prettier-ignore */
'arguments': [textDocument],
};

await client.sendRequest(ExecuteCommandRequest.type, params).then(undefined, () => {
Expand Down
4 changes: 4 additions & 0 deletions lib/stylelint-vscode/index.js
Expand Up @@ -210,6 +210,10 @@ module.exports = async function stylelintVSCode(textDocument, options = {}, serv
try {
resultContainer = await stylelint.lint({ ...options, ...priorOptions });
} catch (err) {
if (!(err instanceof Error)) {
throw err;
}

if (
err.message.startsWith('No configuration provided for') ||
err.message.includes('No rules found within configuration')
Expand Down

0 comments on commit 439c102

Please sign in to comment.