Skip to content

Commit a925803

Browse files
Vue 2 - Lint imports
1 parent f8074cc commit a925803

File tree

10 files changed

+17685
-29746
lines changed

10 files changed

+17685
-29746
lines changed

Diff for: .browserslistrc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
chrome 97
1+
chrome 99

Diff for: .eslintrc.js

+30-7
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
1+
const path = require('path');
2+
3+
const baseRestrictedSyntax = require('eslint-config-tjw-base/no-restricted-syntax.json');
4+
const jestRestrictedSyntax = require('eslint-config-tjw-jest/no-restricted-syntax.json');
5+
16
module.exports = {
27
root: true,
38
parserOptions: {
49
parser: '@babel/eslint-parser',
5-
ecmaVersion: 8,
10+
ecmaVersion: 2022,
611
sourceType: 'module'
712
},
813
env: {
@@ -28,22 +33,40 @@ module.exports = {
2833
'plugin:jest/recommended',
2934
'plugin:vuejs-accessibility/recommended',
3035
'tjw-base',
31-
'tjw-vue'
36+
'tjw-vue',
37+
'tjw-import',
38+
'tjw-jest'
3239
],
3340
rules: {
41+
'import/no-extraneous-dependencies': 'off',
3442
'no-restricted-syntax': [
3543
'error',
36-
'Property[method="true"]'
44+
...baseRestrictedSyntax,
45+
...jestRestrictedSyntax
3746
],
3847
'vuejs-accessibility/label-has-for': [
3948
'error',
4049
{
41-
'components': ['Label'],
42-
'required': {
43-
'some': ['nesting', 'id']
50+
components: ['Label'],
51+
required: {
52+
some: ['nesting', 'id']
4453
},
45-
'allowChildren': false
54+
allowChildren: false
4655
}
4756
]
57+
},
58+
settings: {
59+
'import/resolver': {
60+
webpack: {
61+
config: {
62+
resolve: {
63+
alias: {
64+
'@': path.resolve('src'),
65+
'@@': path.resolve('tests')
66+
}
67+
}
68+
}
69+
}
70+
}
4871
}
4972
};

Diff for: README.md

+7-5
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,25 @@
22

33
[![Build Status](https://travis-ci.org/nwutils/nw-vue-cli-example.svg?branch=master)](https://travis-ci.org/nwutils/nw-vue-cli-example)
44

5-
* 1.x releases use: Vue 2 + NW.js latest + Vue-CLI 4
5+
* 1.x releases use: Vue 2 + NW.js latest + Vue-CLI 5
66
* 2.x releases use: Vue 3 + NW.js latest + Vue-CLI latest
77

88
![A screenshot of the default app running on Windows](screenshot.png)
99

1010
**Comes with:**
1111

12-
* NW.js 0.60.0
13-
* Chrome 97
14-
* Node 17.3.0
15-
* Vue-CLI 4.5.15
12+
* NW.js 0.62.2
13+
* Chrome 99
14+
* Node 17.7.2
15+
* Vue-CLI 5.0.4
1616
* Vue 2.6.14
1717
* Vue-DevTools (latest)
1818
* Babel
1919
* ESLint
2020
* Vue Linting
2121
* A11Y Linting
2222
* Jest Linting
23+
* Import Linting
2324
* Jest (100% test coverage)
2425
* Jest Serializer Vue (TJW)
2526

@@ -35,6 +36,7 @@ Those are both very easily added from the Vue-CLI. There is also no custom styli
3536

3637
If you want to load the app with a splash screen, check the `nw-splasher` branch.
3738

39+
3840
## Documentation
3941

4042
In all .vue components, you have access to `nw`, `global`, `process`, `require`, and the boolean `isDesktop`:

0 commit comments

Comments
 (0)