Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update dependencies #228

Merged
merged 7 commits into from Sep 24, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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