Skip to content

Commit

Permalink
version v0.3.4 (#25)
Browse files Browse the repository at this point in the history
  • Loading branch information
ota-meshi authored Jan 27, 2020
1 parent df5dd86 commit 99c3ea3
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "eslint-plugin-vue-scoped-css",
"version": "0.3.3",
"version": "0.3.4",
"description": "ESLint plugin for Scoped CSS in Vue.js",
"main": "dist/index.js",
"scripts": {
Expand Down
23 changes: 23 additions & 0 deletions tests/lib/rules/require-scoped.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import { RuleTester } from "eslint"
import semver from "semver"
const rule = require("../../../lib/rules/require-scoped")

const parserVersion = require("vue-eslint-parser/package.json").version

const tester = new RuleTester({
parser: require.resolve("vue-eslint-parser"),
parserOptions: {
Expand Down Expand Up @@ -81,5 +84,25 @@ tester.run("require-scoped", rule, {
},
],
},
...(semver.satisfies(parserVersion, ">=7.0.0")
? [
{
code: `
<script>
</script>
<style />
`,
errors: [
{
messageId: "missing",
line: 4,
column: 25,
endLine: 4,
endColumn: 34,
},
],
},
]
: []),
],
})

0 comments on commit 99c3ea3

Please sign in to comment.