Skip to content

Commit 1aa7bf1

Browse files
committed
chore: Update configuration files
0 parents  commit 1aa7bf1

File tree

9 files changed

+242
-0
lines changed

9 files changed

+242
-0
lines changed

.eslintignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/dist/
2+
/tests/unit/coverage/

.eslintrc.js

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
module.exports = {
2+
root: true,
3+
parserOptions: {
4+
sourceType: 'module'
5+
},
6+
extends: [
7+
// https://github.com/vuejs/eslint-plugin-vue#bulb-rules
8+
'plugin:vue/recommended',
9+
// https://github.com/standard/standard/blob/master/docs/RULES-en.md
10+
'standard',
11+
// https://github.com/prettier/eslint-config-prettier
12+
'prettier',
13+
'prettier/standard',
14+
'prettier/vue'
15+
],
16+
rules: {
17+
// Only allow debugger in development
18+
'no-debugger': process.env.PRE_COMMIT ? 'error' : 'off',
19+
// Only allow `console.log` in development
20+
'no-console': process.env.PRE_COMMIT
21+
? ['error', { allow: ['warn', 'error'] }]
22+
: 'off',
23+
'vue/component-name-in-template-casing': [
24+
'error',
25+
'PascalCase',
26+
{
27+
ignores: [
28+
'component',
29+
'template',
30+
'transition',
31+
'transition-group',
32+
'keep-alive',
33+
'slot'
34+
]
35+
}
36+
]
37+
},
38+
overrides: [
39+
{
40+
files: ['src/**/*', 'tests/unit/**/*', 'tests/e2e/**/*'],
41+
excludedFiles: 'app.config.js',
42+
parserOptions: {
43+
parser: 'babel-eslint',
44+
sourceType: 'module'
45+
},
46+
env: {
47+
browser: true
48+
}
49+
},
50+
{
51+
files: ['**/*.unit.js'],
52+
parserOptions: {
53+
parser: 'babel-eslint',
54+
sourceType: 'module'
55+
},
56+
env: { jest: true },
57+
globals: {
58+
mount: false,
59+
shallowMount: false,
60+
shallowMountView: false,
61+
createComponentMocks: false,
62+
createModuleStore: false
63+
}
64+
}
65+
]
66+
}

.gitignore

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
.DS_Store
2+
node_modules
3+
/dist
4+
5+
# local env files
6+
.env.local
7+
.env.*.local
8+
9+
# Log files
10+
npm-debug.log*
11+
yarn-debug.log*
12+
yarn-error.log*
13+
package-lock.json
14+
15+
# Editor directories and files
16+
.idea
17+
.vscode
18+
*.suo
19+
*.ntvs*
20+
*.njsproj
21+
*.sln
22+
*.sw?
23+
*.lock

.prettierignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
**/*.md
2+
**/*.svg
3+
**/*.ejs
4+
**/*.html
5+
package.json

.prettierrc.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
module.exports = {
2+
arrowParens: 'always',
3+
bracketSpacing: true,
4+
htmlWhitespaceSensitivity: 'css',
5+
insertPragma: false,
6+
jsxBracketSameLine: false,
7+
jsxSingleQuote: false,
8+
printWidth: 80,
9+
proseWrap: 'never',
10+
quoteProps: 'as-needed',
11+
requirePragma: false,
12+
semi: false,
13+
singleQuote: true,
14+
tabWidth: 2,
15+
trailingComma: 'none',
16+
useTabs: false,
17+
vueIndentScriptAndStyle: true
18+
}

babel.config.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module.exports = {
2+
presets: ["@vue/cli-plugin-babel/preset"],
3+
}

package.json

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
{
2+
"name": "vue-virtualized-table",
3+
"version": "0.1.0",
4+
"private": true,
5+
"scripts": {
6+
"serve": "vue-cli-service serve",
7+
"build": "vue-cli-service build",
8+
"lint": "vue-cli-service lint"
9+
},
10+
"dependencies": {
11+
"normalize.css": "^8.0.1",
12+
"resize-observer-polyfill": "^1.5.1"
13+
},
14+
"devDependencies": {
15+
"vue": "^2.6.11",
16+
"vue-types": "^1.7.0",
17+
"fast-deep-equal": "^3.1.1",
18+
"@vue/cli-plugin-babel": "^4.3.0",
19+
"@vue/cli-plugin-eslint": "^4.3.0",
20+
"@vue/cli-service": "^4.3.0",
21+
"@vue/eslint-config-prettier": "^5.0.0",
22+
"@vue/eslint-config-standard": "^4.0.0",
23+
"babel-eslint": "^10.1.0",
24+
"eslint-plugin-prettier": "^3.1.3",
25+
"core-js": "^3.6.4",
26+
"element-ui": "^2.13.2",
27+
"eslint": "^6.7.2",
28+
"eslint-plugin-vue": "^6.2.2",
29+
"vue-cli-plugin-element-ui": "^1.1.4",
30+
"vue-template-compiler": "^2.6.11"
31+
},
32+
"eslintConfig": {
33+
"root": true,
34+
"env": {
35+
"node": true
36+
},
37+
"extends": [
38+
"plugin:vue/essential",
39+
"eslint:recommended"
40+
],
41+
"parserOptions": {
42+
"parser": "babel-eslint"
43+
},
44+
"rules": {}
45+
},
46+
"browserslist": [
47+
"> 1%",
48+
"last 2 versions",
49+
"not dead"
50+
]
51+
}

stylelint.config.js

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
module.exports = {
2+
extends: [
3+
// Use the Standard config as the base
4+
// https://github.com/stylelint/stylelint-config-standard
5+
'stylelint-config-standard',
6+
// Enforce a standard order for CSS properties
7+
// https://github.com/stormwarning/stylelint-config-recess-order
8+
'stylelint-config-recess-order',
9+
// Override rules that would interfere with Prettier
10+
// https://github.com/shannonmoeller/stylelint-config-prettier
11+
'stylelint-config-prettier',
12+
// Override rules to allow linting of CSS modules
13+
// https://github.com/pascalduez/stylelint-config-css-modules
14+
'stylelint-config-css-modules',
15+
],
16+
plugins: [
17+
// Bring in some extra rules for SCSS
18+
'stylelint-scss',
19+
],
20+
// Rule lists:
21+
// - https://stylelint.io/user-guide/rules/
22+
// - https://github.com/kristerkari/stylelint-scss#list-of-rules
23+
rules: {
24+
// Allow newlines inside class attribute values
25+
'string-no-newline': null,
26+
// Enforce camelCase for classes and ids, to work better
27+
// with CSS modules
28+
'selector-class-pattern': /^[a-z][a-zA-Z]*(-(enter|leave)(-(active|to))?)?$/,
29+
'selector-id-pattern': /^[a-z][a-zA-Z]*$/,
30+
// Limit the number of universal selectors in a selector,
31+
// to avoid very slow selectors
32+
'selector-max-universal': 1,
33+
// Disallow allow global element/type selectors in scoped modules
34+
'selector-max-type': [0, { ignore: ['child', 'descendant', 'compounded'] }],
35+
// ===
36+
// PRETTIER
37+
// ===
38+
// HACK: to compensate for https://github.com/shannonmoeller/stylelint-config-prettier/issues/4
39+
// Modifying setting from Standard: https://github.com/stylelint/stylelint-config-standard/blob/7b76d7d0060f2e13a331806a09c2096c7536b0a6/index.js#L6
40+
'at-rule-empty-line-before': [
41+
'always',
42+
{
43+
except: ['blockless-after-same-name-blockless', 'first-nested'],
44+
ignore: ['after-comment'],
45+
ignoreAtRules: ['else'],
46+
},
47+
],
48+
// ===
49+
// SCSS
50+
// ===
51+
'scss/dollar-variable-colon-space-after': 'always',
52+
'scss/dollar-variable-colon-space-before': 'never',
53+
'scss/dollar-variable-no-missing-interpolation': true,
54+
'scss/dollar-variable-pattern': /^[a-z-]+$/,
55+
'scss/double-slash-comment-whitespace-inside': 'always',
56+
'scss/operator-no-newline-before': true,
57+
'scss/operator-no-unspaced': true,
58+
'scss/selector-no-redundant-nesting-selector': true,
59+
// Allow SCSS and CSS module keywords beginning with `@`
60+
'at-rule-no-unknown': null,
61+
'scss/at-rule-no-unknown': true,
62+
},
63+
}

vue.config.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
module.exports = {
2+
publicPath:
3+
process.env.NODE_ENV === 'production' ? '/vue-virtualized-table/' : '/',
4+
pages: {
5+
index: {
6+
entry: './example/main.js',
7+
template: './public/index.html',
8+
title: 'vue-virtualized-table example'
9+
}
10+
}
11+
}

0 commit comments

Comments
 (0)