Skip to content

Commit

Permalink
chore(deps): update all
Browse files Browse the repository at this point in the history
  • Loading branch information
keplersj committed Apr 27, 2020
1 parent c0aa9de commit c2521aa
Show file tree
Hide file tree
Showing 11 changed files with 46 additions and 46 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ or jest.config.js:

```js
module.exports = {
preset: "jest-runner-stylelint"
preset: "jest-runner-stylelint",
};
```

Expand Down Expand Up @@ -126,7 +126,7 @@ module.exports = {
"jsx",
"ts",
"tsx",
"vue"
"vue",
],
testMatch: [
"**/*.css",
Expand All @@ -143,8 +143,8 @@ module.exports = {
"**/*.jsx",
"**/*.ts",
"**/*.tsx",
"**/*.vue"
]
"**/*.vue",
],
};
```

Expand Down Expand Up @@ -202,7 +202,7 @@ or in `jest-runner-stylelint.config.js`
module.exports = {
cliOptions: {
// Options here
}
},
};
```

Expand Down
6 changes: 3 additions & 3 deletions jest-preset.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ module.exports = {
"jsx",
"ts",
"tsx",
"vue"
"vue",
],
testMatch: [
"**/*.css",
Expand All @@ -32,6 +32,6 @@ module.exports = {
"**/*.jsx",
"**/*.ts",
"**/*.tsx",
"**/*.vue"
]
"**/*.vue",
],
};
12 changes: 6 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 9 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,17 +57,17 @@
"create-jest-runner": "^0.6.0"
},
"devDependencies": {
"@commitlint/cli": "^8.1.0",
"@commitlint/config-conventional": "^8.1.0",
"@commitlint/cli": "^8.3.5",
"@commitlint/config-conventional": "^8.3.4",
"eslint": "^6.8.0",
"eslint-config-starstuff": "^1.4.5",
"husky": "^4.0.0",
"jest": "^25.1.0",
"jest-runner-eslint": "^0.7.6",
"eslint-config-starstuff": "^1.4.42",
"husky": "^4.2.5",
"jest": "^25.4.0",
"jest-runner-eslint": "^0.7.7",
"jest-runner-prettier": "^0.3.6",
"lint-staged": "^10.0.0",
"prettier": "^2.0.3",
"semantic-release": "^17.0.1",
"lint-staged": "^10.1.7",
"prettier": "^2.0.5",
"semantic-release": "^17.0.7",
"stylelint": "^13.0.0",
"stylelint-config-standard": "^20.0.0"
},
Expand Down
4 changes: 2 additions & 2 deletions src/__fixtures__/jest-runner-stylelint.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module.exports = {
cliOptions: {
allowEmptyInput: true
}
allowEmptyInput: true,
},
};
2 changes: 1 addition & 1 deletion src/__fixtures__/stylelint.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module.exports = {
extends: "stylelint-config-standard"
extends: "stylelint-config-standard",
};
12 changes: 6 additions & 6 deletions src/run.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,31 +9,31 @@ module.exports = ({ testPath, config }) => {
const defaultConfig = {
files: testPath,
formatter: "string",
fix: configOverrides.getFix()
fix: configOverrides.getFix(),
};
const { cliOptions = {} } = getCliOptions(config);

return stylelint
.lint(Object.assign({}, cliOptions, defaultConfig))
.then(data => {
.then((data) => {
if (data.errored) {
return fail({
start,
end: new Date(),
test: {
path: testPath,
errorMessage: data.output
}
errorMessage: data.output,
},
});
}

return pass({
start,
end: new Date(),
test: { path: testPath }
test: { path: testPath },
});
})
.catch(error => {
.catch((error) => {
throw error;
});
};
14 changes: 7 additions & 7 deletions src/run.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ expect.addSnapshotSerializer({
print: (value, serialize) => {
delete value.perfStats;
delete value.testFilePath;
value.testResults.forEach(result => {
value.testResults.forEach((result) => {
delete result.duration;
});
return serialize(value);
},
test: value =>
value && value.perfStats && value.testFilePath && value.testResults
test: (value) =>
value && value.perfStats && value.testFilePath && value.testResults,
});

describe("jest-runner-stylelint", () => {
Expand All @@ -21,16 +21,16 @@ describe("jest-runner-stylelint", () => {
run({
testPath: path.join(__dirname, "__fixtures__", "bad.css"),
config: {},
globalConfig: {}
}).then(result => expect(result).toMatchSnapshot()));
globalConfig: {},
}).then((result) => expect(result).toMatchSnapshot()));
});

describe("passing fixture", () => {
it("matches snapshot", () =>
run({
testPath: path.join(__dirname, "__fixtures__", "good.css"),
config: {},
globalConfig: {}
}).then(result => expect(result).toMatchSnapshot()));
globalConfig: {},
}).then((result) => expect(result).toMatchSnapshot()));
});
});
4 changes: 2 additions & 2 deletions src/utils/normalizeConfig.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const normalizeConfig = config => {
const normalizeConfig = (config) => {
return Object.assign({}, config, {
cliOptions: config.cliOptions || {}
cliOptions: config.cliOptions || {},
});
};

Expand Down
2 changes: 1 addition & 1 deletion src/watchFixPlugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class StylelintWatchFixPlugin {
getUsageInfo() {
return {
key: this._key,
prompt: getPrompt()
prompt: getPrompt(),
};
}
}
Expand Down
8 changes: 4 additions & 4 deletions src/watchFixPlugin.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,21 @@ describe("watchFixPlugin", () => {
const plugin = new WatchFixPlugin({ stdout, config });
expect(plugin.getUsageInfo()).toEqual({
key: "F",
prompt: "override Stylelint --fix"
prompt: "override Stylelint --fix",
});

await plugin.run(plugin);

expect(plugin.getUsageInfo()).toEqual({
key: "F",
prompt: "toggle Stylelint --fix (enabled)"
prompt: "toggle Stylelint --fix (enabled)",
});

await plugin.run(plugin);

expect(plugin.getUsageInfo()).toEqual({
key: "F",
prompt: "toggle Stylelint --fix (disabled)"
prompt: "toggle Stylelint --fix (disabled)",
});
});

Expand All @@ -55,7 +55,7 @@ describe("watchFixPlugin", () => {
const plugin = new WatchFixPlugin({ stdout, config });
expect(plugin.getUsageInfo()).toEqual({
key: "z",
prompt: "override Stylelint --fix"
prompt: "override Stylelint --fix",
});
});
});

0 comments on commit c2521aa

Please sign in to comment.