-
-
Notifications
You must be signed in to change notification settings - Fork 669
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix: upgrade vue-eslint-parser (#34)
* Fix: upgrade vue-eslint-parser - Make correct ASTs about self-closing elements (fixes #29) - Improve the integration with eslint-plugin-import (refs #21) * add comments to integration test
- Loading branch information
1 parent
7fb94b9
commit 22aeca5
Showing
13 changed files
with
119 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
/.nyc_output | ||
/coverage | ||
/tests/integrations/*/node_modules | ||
/node_modules | ||
/test.* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"editor.tabSize": 2 | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"env": { | ||
"mocha": true | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
/** | ||
* @author Toru Nagashima <https://github.com/mysticatea> | ||
* @copyright 2017 Toru Nagashima. All rights reserved. | ||
* See LICENSE file in root directory for full license. | ||
*/ | ||
'use strict' | ||
|
||
// ----------------------------------------------------------------------------- | ||
// Requirements | ||
// ----------------------------------------------------------------------------- | ||
|
||
const cp = require('child_process') | ||
const path = require('path') | ||
|
||
// ----------------------------------------------------------------------------- | ||
// Tests | ||
// ----------------------------------------------------------------------------- | ||
|
||
const ESLINT = `.${path.sep}node_modules${path.sep}.bin${path.sep}eslint` | ||
|
||
describe('Integration with eslint-plugin-import', () => { | ||
let originalCwd | ||
|
||
before(() => { | ||
originalCwd = process.cwd() | ||
process.chdir(path.join(__dirname, 'eslint-plugin-import')) | ||
cp.execSync('npm i', { stdio: 'inherit', env: { npm_config_package_lock: 'false' }}) | ||
}) | ||
after(() => { | ||
process.chdir(originalCwd) | ||
}) | ||
|
||
// https://github.com/vuejs/eslint-plugin-vue/issues/21#issuecomment-308957697 | ||
// eslint-plugin-vue had been breaking eslint-plugin-import if people use both at the same time. | ||
// This test is in order to prevent the regression. | ||
it('should lint without errors', () => { | ||
cp.execSync(`${ESLINT} a.vue`, { stdio: 'inherit' }) | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{ | ||
"root": true, | ||
"parserOptions": { | ||
"sourceType": "module", | ||
"ecmaVersion": 2015 | ||
}, | ||
"parser": "vue-eslint-parser", | ||
"plugins": [ | ||
"import", | ||
"vue" | ||
], | ||
"rules": { | ||
"import/default": "warn", | ||
"import/namespace": "warn" | ||
}, | ||
"settings": { | ||
"import/extensions": [ | ||
".js", | ||
".vue" | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<template> | ||
<b></b> | ||
</template> | ||
|
||
<script> | ||
import B from "./b.vue" | ||
export default { | ||
components: {B} | ||
} | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<template> | ||
<div>Hello</div> | ||
</template> | ||
|
||
<script> | ||
export default {} | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"private": true, | ||
"name": "integration-test-for-eslint-plugin-import", | ||
"version": "1.0.0", | ||
"description": "Integration test for eslint-plugin-import", | ||
"scripts": {}, | ||
"keywords": [], | ||
"author": "Toru Nagashima (https://github.com/mysticatea)", | ||
"license": "MIT", | ||
"dependencies": { | ||
"eslint": "~3.19.0", | ||
"eslint-plugin-import": "~2.3.0", | ||
"eslint-plugin-vue": "file:../../.." | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters