├── .gitignore ├── .snyk ├── .travis.yml ├── CHANGELOG.md ├── CONTRIBUTING.md ├── LICENSE ├── README.md ├── ava.config.js ├── nyc.config.js ├── package.json ├── prettier.config.js ├── release.config.js ├── rollup.config.js ├── src ├── base.js ├── index.js └── spaces.js ├── test └── test.js └── yarn.lock /.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | 8 | # Runtime data 9 | pids 10 | *.pid 11 | *.seed 12 | *.pid.lock 13 | 14 | # Directory for instrumented libs generated by jscoverage/JSCover 15 | lib-cov 16 | 17 | # Coverage directory used by tools like istanbul 18 | coverage 19 | 20 | # nyc test coverage 21 | .nyc_output 22 | 23 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) 24 | .grunt 25 | 26 | # Bower dependency directory (https://bower.io/) 27 | bower_components 28 | 29 | # node-waf configuration 30 | .lock-wscript 31 | 32 | # Compiled binary addons (https://nodejs.org/api/addons.html) 33 | build/Release 34 | 35 | # Dependency directories 36 | node_modules/ 37 | jspm_packages/ 38 | 39 | # TypeScript v1 declaration files 40 | typings/ 41 | 42 | # Optional npm cache directory 43 | .npm 44 | 45 | # Optional eslint cache 46 | .eslintcache 47 | 48 | # Optional REPL history 49 | .node_repl_history 50 | 51 | # Output of 'npm pack' 52 | *.tgz 53 | dist 54 | 55 | # Yarn Integrity file 56 | .yarn-integrity 57 | 58 | # dotenv environment variables file 59 | .env 60 | 61 | # next.js build output 62 | .next 63 | -------------------------------------------------------------------------------- /.snyk: -------------------------------------------------------------------------------- 1 | # Snyk (https://snyk.io) policy file, patches or ignores known vulnerabilities. 2 | version: v1.19.0 3 | # ignores vulnerabilities until expiry date; change duration by modifying expiry date 4 | ignore: 5 | SNYK-JS-ACORN-559469: 6 | - eslint-plugin-unicorn > eslint-template-visitor > espree > acorn: 7 | reason: No patch availablle 8 | expires: '2020-06-10T22:20:12.152Z' 9 | SNYK-JS-BINLINKS-537608: 10 | - bin-links: 11 | reason: None given 12 | expires: '2020-06-10T22:20:12.152Z' 13 | SNYK-JS-MINIMIST-559764: 14 | - bin-links > gentle-fs > mkdirp > minimist: 15 | reason: None given 16 | expires: '2020-06-10T22:20:12.152Z' 17 | - cacache > move-concurrently > mkdirp > minimist: 18 | reason: None given 19 | expires: '2020-06-10T22:20:12.152Z' 20 | - gentle-fs > cmd-shim > mkdirp > minimist: 21 | reason: None given 22 | expires: '2020-06-10T22:20:12.152Z' 23 | - libcipm > pacote > mkdirp > minimist: 24 | reason: None given 25 | expires: '2020-06-10T22:20:12.152Z' 26 | - libnpm > pacote > mkdirp > minimist: 27 | reason: None given 28 | expires: '2020-06-10T22:20:12.152Z' 29 | - libcipm > bin-links > cmd-shim > mkdirp > minimist: 30 | reason: None given 31 | expires: '2020-06-10T22:20:12.152Z' 32 | - libnpm > bin-links > cmd-shim > mkdirp > minimist: 33 | reason: None given 34 | expires: '2020-06-10T22:20:12.152Z' 35 | - libcipm > bin-links > gentle-fs > mkdirp > minimist: 36 | reason: None given 37 | expires: '2020-06-10T22:20:12.152Z' 38 | - libnpm > bin-links > gentle-fs > mkdirp > minimist: 39 | reason: None given 40 | expires: '2020-06-10T22:20:12.152Z' 41 | - cacache > move-concurrently > copy-concurrently > mkdirp > minimist: 42 | reason: None given 43 | expires: '2020-06-10T22:20:12.152Z' 44 | - libnpm > pacote > cacache > mkdirp > minimist: 45 | reason: None given 46 | expires: '2020-06-10T22:20:12.152Z' 47 | - libnpm > pacote > tar > mkdirp > minimist: 48 | reason: None given 49 | expires: '2020-06-10T22:20:12.153Z' 50 | - libcipm > npm-lifecycle > node-gyp > mkdirp > minimist: 51 | reason: None given 52 | expires: '2020-06-10T22:20:12.153Z' 53 | - libnpm > npm-lifecycle > node-gyp > mkdirp > minimist: 54 | reason: None given 55 | expires: '2020-06-10T22:20:12.153Z' 56 | - libcipm > pacote > cacache > mkdirp > minimist: 57 | reason: None given 58 | expires: '2020-06-10T22:20:12.153Z' 59 | - libcipm > pacote > tar > mkdirp > minimist: 60 | reason: None given 61 | expires: '2020-06-10T22:20:12.153Z' 62 | - libnpm > pacote > cacache > move-concurrently > mkdirp > minimist: 63 | reason: None given 64 | expires: '2020-06-10T22:20:12.153Z' 65 | - libcipm > pacote > cacache > move-concurrently > mkdirp > minimist: 66 | reason: None given 67 | expires: '2020-06-10T22:20:12.153Z' 68 | - libnpm > npm-registry-fetch > make-fetch-happen > cacache > mkdirp > minimist: 69 | reason: None given 70 | expires: '2020-06-10T22:20:12.153Z' 71 | - libnpm > pacote > make-fetch-happen > cacache > mkdirp > minimist: 72 | reason: None given 73 | expires: '2020-06-10T22:20:12.153Z' 74 | - libcipm > npm-lifecycle > node-gyp > tar > mkdirp > minimist: 75 | reason: None given 76 | expires: '2020-06-10T22:20:12.153Z' 77 | - libnpm > npm-lifecycle > node-gyp > tar > mkdirp > minimist: 78 | reason: None given 79 | expires: '2020-06-10T22:20:12.153Z' 80 | - libcipm > pacote > make-fetch-happen > cacache > mkdirp > minimist: 81 | reason: None given 82 | expires: '2020-06-10T22:20:12.153Z' 83 | - libnpm > pacote > cacache > move-concurrently > copy-concurrently > mkdirp > minimist: 84 | reason: None given 85 | expires: '2020-06-10T22:20:12.153Z' 86 | - libcipm > pacote > cacache > move-concurrently > copy-concurrently > mkdirp > minimist: 87 | reason: None given 88 | expires: '2020-06-10T22:20:12.153Z' 89 | - libnpm > npm-registry-fetch > make-fetch-happen > cacache > move-concurrently > mkdirp > minimist: 90 | reason: None given 91 | expires: '2020-06-10T22:20:12.153Z' 92 | - libnpm > pacote > make-fetch-happen > cacache > move-concurrently > mkdirp > minimist: 93 | reason: None given 94 | expires: '2020-06-10T22:20:12.153Z' 95 | - libcipm > pacote > make-fetch-happen > cacache > move-concurrently > mkdirp > minimist: 96 | reason: None given 97 | expires: '2020-06-10T22:20:12.153Z' 98 | - libnpm > libnpmaccess > npm-registry-fetch > make-fetch-happen > cacache > mkdirp > minimist: 99 | reason: None given 100 | expires: '2020-06-10T22:20:12.153Z' 101 | - libnpm > libnpmhook > npm-registry-fetch > make-fetch-happen > cacache > mkdirp > minimist: 102 | reason: None given 103 | expires: '2020-06-10T22:20:12.153Z' 104 | - libnpm > libnpmorg > npm-registry-fetch > make-fetch-happen > cacache > mkdirp > minimist: 105 | reason: None given 106 | expires: '2020-06-10T22:20:12.153Z' 107 | - libnpm > libnpmpublish > npm-registry-fetch > make-fetch-happen > cacache > mkdirp > minimist: 108 | reason: None given 109 | expires: '2020-06-10T22:20:12.153Z' 110 | - libnpm > libnpmsearch > npm-registry-fetch > make-fetch-happen > cacache > mkdirp > minimist: 111 | reason: None given 112 | expires: '2020-06-10T22:20:12.153Z' 113 | - libnpm > libnpmteam > npm-registry-fetch > make-fetch-happen > cacache > mkdirp > minimist: 114 | reason: None given 115 | expires: '2020-06-10T22:20:12.153Z' 116 | - libnpm > npm-profile > npm-registry-fetch > make-fetch-happen > cacache > mkdirp > minimist: 117 | reason: None given 118 | expires: '2020-06-10T22:20:12.153Z' 119 | - libnpm > pacote > npm-registry-fetch > make-fetch-happen > cacache > mkdirp > minimist: 120 | reason: None given 121 | expires: '2020-06-10T22:20:12.153Z' 122 | - libcipm > pacote > npm-registry-fetch > make-fetch-happen > cacache > mkdirp > minimist: 123 | reason: None given 124 | expires: '2020-06-10T22:20:12.153Z' 125 | - libnpm > npm-registry-fetch > make-fetch-happen > cacache > move-concurrently > copy-concurrently > mkdirp > minimist: 126 | reason: None given 127 | expires: '2020-06-10T22:20:12.153Z' 128 | - libnpm > pacote > make-fetch-happen > cacache > move-concurrently > copy-concurrently > mkdirp > minimist: 129 | reason: None given 130 | expires: '2020-06-10T22:20:12.153Z' 131 | - libcipm > pacote > make-fetch-happen > cacache > move-concurrently > copy-concurrently > mkdirp > minimist: 132 | reason: None given 133 | expires: '2020-06-10T22:20:12.153Z' 134 | - libnpm > libnpmaccess > npm-registry-fetch > make-fetch-happen > cacache > move-concurrently > mkdirp > minimist: 135 | reason: None given 136 | expires: '2020-06-10T22:20:12.153Z' 137 | - libnpm > libnpmhook > npm-registry-fetch > make-fetch-happen > cacache > move-concurrently > mkdirp > minimist: 138 | reason: None given 139 | expires: '2020-06-10T22:20:12.153Z' 140 | - libnpm > libnpmorg > npm-registry-fetch > make-fetch-happen > cacache > move-concurrently > mkdirp > minimist: 141 | reason: None given 142 | expires: '2020-06-10T22:20:12.153Z' 143 | - libnpm > libnpmpublish > npm-registry-fetch > make-fetch-happen > cacache > move-concurrently > mkdirp > minimist: 144 | reason: None given 145 | expires: '2020-06-10T22:20:12.153Z' 146 | - libnpm > libnpmsearch > npm-registry-fetch > make-fetch-happen > cacache > move-concurrently > mkdirp > minimist: 147 | reason: None given 148 | expires: '2020-06-10T22:20:12.154Z' 149 | - libnpm > libnpmteam > npm-registry-fetch > make-fetch-happen > cacache > move-concurrently > mkdirp > minimist: 150 | reason: None given 151 | expires: '2020-06-10T22:20:12.154Z' 152 | - libnpm > npm-profile > npm-registry-fetch > make-fetch-happen > cacache > move-concurrently > mkdirp > minimist: 153 | reason: None given 154 | expires: '2020-06-10T22:20:12.154Z' 155 | - libnpm > pacote > npm-registry-fetch > make-fetch-happen > cacache > move-concurrently > mkdirp > minimist: 156 | reason: None given 157 | expires: '2020-06-10T22:20:12.154Z' 158 | - libcipm > pacote > npm-registry-fetch > make-fetch-happen > cacache > move-concurrently > mkdirp > minimist: 159 | reason: None given 160 | expires: '2020-06-10T22:20:12.154Z' 161 | - libnpm > libnpmaccess > npm-registry-fetch > make-fetch-happen > cacache > move-concurrently > copy-concurrently > mkdirp > minimist: 162 | reason: None given 163 | expires: '2020-06-10T22:20:12.154Z' 164 | - libnpm > libnpmhook > npm-registry-fetch > make-fetch-happen > cacache > move-concurrently > copy-concurrently > mkdirp > minimist: 165 | reason: None given 166 | expires: '2020-06-10T22:20:12.154Z' 167 | - libnpm > libnpmorg > npm-registry-fetch > make-fetch-happen > cacache > move-concurrently > copy-concurrently > mkdirp > minimist: 168 | reason: None given 169 | expires: '2020-06-10T22:20:12.154Z' 170 | - libnpm > libnpmpublish > npm-registry-fetch > make-fetch-happen > cacache > move-concurrently > copy-concurrently > mkdirp > minimist: 171 | reason: None given 172 | expires: '2020-06-10T22:20:12.154Z' 173 | - libnpm > libnpmsearch > npm-registry-fetch > make-fetch-happen > cacache > move-concurrently > copy-concurrently > mkdirp > minimist: 174 | reason: None given 175 | expires: '2020-06-10T22:20:12.154Z' 176 | - libnpm > libnpmteam > npm-registry-fetch > make-fetch-happen > cacache > move-concurrently > copy-concurrently > mkdirp > minimist: 177 | reason: None given 178 | expires: '2020-06-10T22:20:12.154Z' 179 | - libnpm > npm-profile > npm-registry-fetch > make-fetch-happen > cacache > move-concurrently > copy-concurrently > mkdirp > minimist: 180 | reason: None given 181 | expires: '2020-06-10T22:20:12.154Z' 182 | - libnpm > pacote > npm-registry-fetch > make-fetch-happen > cacache > move-concurrently > copy-concurrently > mkdirp > minimist: 183 | reason: None given 184 | expires: '2020-06-10T22:20:12.154Z' 185 | - libcipm > pacote > npm-registry-fetch > make-fetch-happen > cacache > move-concurrently > copy-concurrently > mkdirp > minimist: 186 | reason: None given 187 | expires: '2020-06-10T22:20:12.154Z' 188 | - libnpx > update-notifier > latest-version > package-json > registry-auth-token > rc > minimist: 189 | reason: None given 190 | expires: '2020-06-10T22:20:12.154Z' 191 | - snyk > @snyk/update-notifier > latest-version > package-json > registry-auth-token > rc > minimist: 192 | reason: None given 193 | expires: '2020-06-10T22:20:12.154Z' 194 | - libnpx > update-notifier > latest-version > package-json > registry-url > rc > minimist: 195 | reason: None given 196 | expires: '2020-06-10T22:20:12.154Z' 197 | - snyk > @snyk/update-notifier > latest-version > package-json > registry-url > rc > minimist: 198 | reason: None given 199 | expires: '2020-06-10T22:20:12.154Z' 200 | SNYK-JS-YARGSPARSER-560381: 201 | - libnpx > yargs > yargs-parser: 202 | reason: None given 203 | expires: '2020-06-10T22:20:12.154Z' 204 | 'npm:mem:20180117': 205 | - libnpx > yargs > os-locale > mem: 206 | reason: None given 207 | expires: '2020-06-10T22:20:12.154Z' 208 | # patches apply the minimum changes required to fix a vulnerability 209 | patch: 210 | SNYK-JS-LODASH-567746: 211 | - vue-eslint-parser > lodash: 212 | patched: '2020-05-11T22:16:21.114Z' 213 | - snyk > @snyk/snyk-cocoapods-plugin > @snyk/dep-graph > graphlib > lodash: 214 | patched: '2020-09-05T19:39:34.260Z' 215 | - snyk > snyk-cpp-plugin > @snyk/dep-graph > graphlib > lodash: 216 | patched: '2020-09-05T19:39:34.260Z' 217 | - snyk > snyk-gradle-plugin > @snyk/dep-graph > graphlib > lodash: 218 | patched: '2020-09-05T19:39:34.260Z' 219 | - snyk > snyk-docker-plugin > snyk-nodejs-lockfile-parser > graphlib > lodash: 220 | patched: '2020-09-09T07:00:27.186Z' 221 | - snyk > graphlib > lodash: 222 | patched: '2020-09-17T05:21:18.954Z' 223 | - snyk > @snyk/dep-graph > graphlib > lodash: 224 | patched: '2020-09-17T05:21:18.954Z' 225 | - snyk > snyk-nodejs-lockfile-parser > graphlib > lodash: 226 | patched: '2020-09-17T05:21:18.954Z' 227 | - snyk > snyk-go-plugin > graphlib > lodash: 228 | patched: '2020-09-17T05:21:18.954Z' 229 | - snyk > snyk-go-plugin > @snyk/dep-graph > graphlib > lodash: 230 | patched: '2020-09-17T05:21:18.954Z' 231 | - snyk > snyk-mvn-plugin > @snyk/java-call-graph-builder > graphlib > lodash: 232 | patched: '2020-09-17T05:21:18.954Z' 233 | - snyk > @snyk/snyk-cocoapods-plugin > @snyk/cocoapods-lockfile-parser > @snyk/dep-graph > graphlib > lodash: 234 | patched: '2020-09-17T05:21:18.954Z' 235 | - snyk > snyk-php-plugin > @snyk/cli-interface > @snyk/dep-graph > graphlib > lodash: 236 | patched: '2020-09-17T05:21:18.954Z' 237 | - snyk > snyk-gradle-plugin > @snyk/cli-interface > @snyk/dep-graph > graphlib > lodash: 238 | patched: '2020-09-17T05:21:18.954Z' 239 | - snyk > snyk-mvn-plugin > @snyk/cli-interface > @snyk/dep-graph > graphlib > lodash: 240 | patched: '2020-09-17T05:21:18.954Z' 241 | SNYK-JS-HTTPSPROXYAGENT-469131: 242 | - libcipm > pacote > npm-registry-fetch > make-fetch-happen > https-proxy-agent: 243 | patched: '2020-05-11T22:16:21.114Z' 244 | - libcipm > pacote > make-fetch-happen > https-proxy-agent: 245 | patched: '2020-05-11T22:16:21.114Z' 246 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - lts/* 4 | - node 5 | before_install: 6 | - curl -o- -L https://yarnpkg.com/install.sh | bash -s -- 7 | - export PATH="$HOME/.yarn/bin:$PATH" 8 | stages: 9 | - name: test 10 | - name: build 11 | if: (branch != master) OR fork 12 | - name: release 13 | if: (branch = master) AND NOT fork 14 | 15 | jobs: 16 | include: 17 | - env: TEST="yarn lint:test" 18 | name: "Style Checks" 19 | script: yarn lint:test 20 | - env: TEST="test" 21 | name: "Unit tests" 22 | script: yarn test:unit 23 | - stage: build 24 | script: yarn build 25 | - stage: release 26 | script: yarn build && yarn release 27 | cache: yarn -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | ## [3.1.23](https://github.com/ChocPanda/eslint-config-xo-vue/compare/v3.1.22...v3.1.23) (2020-09-05) 2 | 3 | 4 | ### Bug Fixes 5 | 6 | * upgrade snyk from 1.362.1 to 1.388.0 ([9408d5e](https://github.com/ChocPanda/eslint-config-xo-vue/commit/9408d5e)) 7 | 8 | ## [3.1.22](https://github.com/ChocPanda/eslint-config-xo-vue/compare/v3.1.21...v3.1.22) (2020-09-03) 9 | 10 | 11 | ### Bug Fixes 12 | 13 | * upgrade snyk from 1.361.3 to 1.362.0 ([c487ce7](https://github.com/ChocPanda/eslint-config-xo-vue/commit/c487ce7)) 14 | 15 | ## [3.1.21](https://github.com/ChocPanda/eslint-config-xo-vue/compare/v3.1.20...v3.1.21) (2020-07-12) 16 | 17 | 18 | ### Bug Fixes 19 | 20 | * upgrade snyk from 1.360.0 to 1.361.3 ([9b6bb9c](https://github.com/ChocPanda/eslint-config-xo-vue/commit/9b6bb9c)) 21 | 22 | ## [3.1.20](https://github.com/ChocPanda/eslint-config-xo-vue/compare/v3.1.19...v3.1.20) (2020-07-06) 23 | 24 | 25 | ### Bug Fixes 26 | 27 | * upgrade snyk from 1.359.1 to 1.360.0 ([65d00db](https://github.com/ChocPanda/eslint-config-xo-vue/commit/65d00db)) 28 | 29 | ## [3.1.19](https://github.com/ChocPanda/eslint-config-xo-vue/compare/v3.1.18...v3.1.19) (2020-07-04) 30 | 31 | 32 | ### Bug Fixes 33 | 34 | * upgrade snyk from 1.355.0 to 1.359.0 ([fa304e2](https://github.com/ChocPanda/eslint-config-xo-vue/commit/fa304e2)) 35 | 36 | ## [3.1.18](https://github.com/ChocPanda/eslint-config-xo-vue/compare/v3.1.17...v3.1.18) (2020-07-02) 37 | 38 | 39 | ### Bug Fixes 40 | 41 | * upgrade snyk from 1.349.0 to 1.352.1 ([2dfd07a](https://github.com/ChocPanda/eslint-config-xo-vue/commit/2dfd07a)) 42 | 43 | ## [3.1.17](https://github.com/ChocPanda/eslint-config-xo-vue/compare/v3.1.16...v3.1.17) (2020-06-26) 44 | 45 | 46 | ### Bug Fixes 47 | 48 | * upgrade snyk from 1.348.1 to 1.348.2 ([b909b28](https://github.com/ChocPanda/eslint-config-xo-vue/commit/b909b28)) 49 | 50 | ## [3.1.16](https://github.com/ChocPanda/eslint-config-xo-vue/compare/v3.1.15...v3.1.16) (2020-06-24) 51 | 52 | 53 | ### Bug Fixes 54 | 55 | * upgrade snyk from 1.346.0 to 1.347.1 ([38ef610](https://github.com/ChocPanda/eslint-config-xo-vue/commit/38ef610)) 56 | 57 | ## [3.1.15](https://github.com/ChocPanda/eslint-config-xo-vue/compare/v3.1.14...v3.1.15) (2020-06-20) 58 | 59 | 60 | ### Bug Fixes 61 | 62 | * upgrade snyk from 1.342.2 to 1.345.1 ([b12f312](https://github.com/ChocPanda/eslint-config-xo-vue/commit/b12f312)) 63 | 64 | ## [3.1.14](https://github.com/ChocPanda/eslint-config-xo-vue/compare/v3.1.13...v3.1.14) (2020-06-18) 65 | 66 | 67 | ### Bug Fixes 68 | 69 | * upgrade snyk from 1.341.1 to 1.342.2 ([4c8c05e](https://github.com/ChocPanda/eslint-config-xo-vue/commit/4c8c05e)) 70 | 71 | ## [3.1.13](https://github.com/ChocPanda/eslint-config-xo-vue/compare/v3.1.12...v3.1.13) (2020-06-16) 72 | 73 | 74 | ### Bug Fixes 75 | 76 | * upgrade snyk from 1.339.2 to 1.339.3 ([47cd662](https://github.com/ChocPanda/eslint-config-xo-vue/commit/47cd662)) 77 | 78 | ## [3.1.12](https://github.com/ChocPanda/eslint-config-xo-vue/compare/v3.1.11...v3.1.12) (2020-06-13) 79 | 80 | 81 | ### Bug Fixes 82 | 83 | * upgrade snyk from 1.339.0 to 1.339.1 ([ea1bc02](https://github.com/ChocPanda/eslint-config-xo-vue/commit/ea1bc02)) 84 | 85 | ## [3.1.11](https://github.com/ChocPanda/eslint-config-xo-vue/compare/v3.1.10...v3.1.11) (2020-06-11) 86 | 87 | 88 | ### Bug Fixes 89 | 90 | * upgrade snyk from 1.336.0 to 1.337.0 ([30e8ca8](https://github.com/ChocPanda/eslint-config-xo-vue/commit/30e8ca8)) 91 | 92 | ## [3.1.10](https://github.com/ChocPanda/eslint-config-xo-vue/compare/v3.1.9...v3.1.10) (2020-06-05) 93 | 94 | 95 | ### Bug Fixes 96 | 97 | * upgrade snyk from 1.334.0 to 1.335.0 ([d6b78ef](https://github.com/ChocPanda/eslint-config-xo-vue/commit/d6b78ef)) 98 | 99 | ## [3.1.9](https://github.com/ChocPanda/eslint-config-xo-vue/compare/v3.1.8...v3.1.9) (2020-06-02) 100 | 101 | 102 | ### Bug Fixes 103 | 104 | * upgrade snyk from 1.332.1 to 1.333.0 ([54ece8d](https://github.com/ChocPanda/eslint-config-xo-vue/commit/54ece8d)) 105 | 106 | ## [3.1.8](https://github.com/ChocPanda/eslint-config-xo-vue/compare/v3.1.7...v3.1.8) (2020-05-31) 107 | 108 | 109 | ### Bug Fixes 110 | 111 | * upgrade snyk from 1.332.0 to 1.332.1 ([c8bd656](https://github.com/ChocPanda/eslint-config-xo-vue/commit/c8bd656)) 112 | 113 | ## [3.1.7](https://github.com/ChocPanda/eslint-config-xo-vue/compare/v3.1.6...v3.1.7) (2020-05-29) 114 | 115 | 116 | ### Bug Fixes 117 | 118 | * upgrade snyk from 1.327.0 to 1.330.2 ([834d958](https://github.com/ChocPanda/eslint-config-xo-vue/commit/834d958)) 119 | 120 | ## [3.1.6](https://github.com/ChocPanda/eslint-config-xo-vue/compare/v3.1.5...v3.1.6) (2020-05-26) 121 | 122 | 123 | ### Bug Fixes 124 | 125 | * upgrade snyk from 1.324.0 to 1.327.0 ([9c0bcb9](https://github.com/ChocPanda/eslint-config-xo-vue/commit/9c0bcb9)) 126 | * upgrade snyk from 1.324.0 to 1.327.0 ([f6f88f4](https://github.com/ChocPanda/eslint-config-xo-vue/commit/f6f88f4)) 127 | 128 | ## [3.1.5](https://github.com/ChocPanda/eslint-config-xo-vue/compare/v3.1.4...v3.1.5) (2020-05-24) 129 | 130 | 131 | ### Bug Fixes 132 | 133 | * upgrade snyk from 1.321.0 to 1.324.0 ([b2f4e05](https://github.com/ChocPanda/eslint-config-xo-vue/commit/b2f4e05)) 134 | * upgrade snyk from 1.321.0 to 1.324.0 ([ff85b19](https://github.com/ChocPanda/eslint-config-xo-vue/commit/ff85b19)) 135 | 136 | ## [3.1.4](https://github.com/ChocPanda/eslint-config-xo-vue/compare/v3.1.3...v3.1.4) (2020-05-23) 137 | 138 | 139 | ### Bug Fixes 140 | 141 | * upgrade snyk from 1.320.2 to 1.320.3 ([ac7aee9](https://github.com/ChocPanda/eslint-config-xo-vue/commit/ac7aee9)) 142 | * upgrade snyk from 1.320.2 to 1.320.3 ([9634cf3](https://github.com/ChocPanda/eslint-config-xo-vue/commit/9634cf3)) 143 | 144 | ## [3.1.3](https://github.com/ChocPanda/eslint-config-xo-vue/compare/v3.1.2...v3.1.3) (2020-05-17) 145 | 146 | 147 | ### Bug Fixes 148 | 149 | * upgrade vue-eslint-parser from 7.0.0 to 7.1.0 ([d23a870](https://github.com/ChocPanda/eslint-config-xo-vue/commit/d23a870)) 150 | * upgrade vue-eslint-parser from 7.0.0 to 7.1.0 ([7bdc671](https://github.com/ChocPanda/eslint-config-xo-vue/commit/7bdc671)) 151 | 152 | ## [3.1.2](https://github.com/ChocPanda/eslint-config-xo-vue/compare/v3.1.1...v3.1.2) (2020-05-13) 153 | 154 | 155 | ### Bug Fixes 156 | 157 | * .snyk & package.json to reduce vulnerabilities ([296559b](https://github.com/ChocPanda/eslint-config-xo-vue/commit/296559b)) 158 | * .snyk & package.json to reduce vulnerabilities ([a136aaf](https://github.com/ChocPanda/eslint-config-xo-vue/commit/a136aaf)) 159 | 160 | ## [3.1.1](https://github.com/ChocPanda/eslint-config-xo-vue/compare/v3.1.0...v3.1.1) (2020-02-15) 161 | 162 | 163 | ### Bug Fixes 164 | 165 | * **package:** update eslint-plugin-unicorn to version 16.1.1 ([9dab16b](https://github.com/ChocPanda/eslint-config-xo-vue/commit/9dab16b)), closes [#35](https://github.com/ChocPanda/eslint-config-xo-vue/issues/35) 166 | 167 | # [3.1.0](https://github.com/ChocPanda/eslint-config-xo-vue/compare/v3.0.3...v3.1.0) (2019-11-16) 168 | 169 | 170 | ### Features 171 | 172 | * **rules:** update to eslint-plugin-vue version 6.0.1 ([60d6d42](https://github.com/ChocPanda/eslint-config-xo-vue/commit/60d6d42)) 173 | 174 | ## [3.0.3](https://github.com/ChocPanda/eslint-config-xo-vue/compare/v3.0.2...v3.0.3) (2019-11-16) 175 | 176 | 177 | ### Bug Fixes 178 | 179 | * **package:** update eslint-plugin-unicorn to version 13.0.0 ([158da45](https://github.com/ChocPanda/eslint-config-xo-vue/commit/158da45)) 180 | 181 | ## [3.0.2](https://github.com/ChocPanda/eslint-config-xo-vue/compare/v3.0.1...v3.0.2) (2019-11-10) 182 | 183 | 184 | ### Bug Fixes 185 | 186 | * **package:** update vue-eslint-parser to version 7.0.0 ([38c11b2](https://github.com/ChocPanda/eslint-config-xo-vue/commit/38c11b2)) 187 | 188 | ## [3.0.1](https://github.com/ChocPanda/eslint-config-xo-vue/compare/v3.0.0...v3.0.1) (2019-11-08) 189 | 190 | 191 | ### Bug Fixes 192 | 193 | * **package:** Fix peer dependency for eslint-plugin-vue and import/no-unresolved misconfiguration ([f379287](https://github.com/ChocPanda/eslint-config-xo-vue/commit/f379287)) 194 | 195 | # [3.0.0](https://github.com/ChocPanda/eslint-config-xo-vue/compare/v2.0.3...v3.0.0) (2019-09-28) 196 | 197 | 198 | * build: ([2870818](https://github.com/ChocPanda/eslint-config-xo-vue/commit/2870818)) 199 | 200 | 201 | ### BREAKING CHANGES 202 | 203 | * Update output to remove cache prevention 204 | 205 | ## [2.0.3](https://github.com/ChocPanda/eslint-config-xo-vue/compare/v2.0.2...v2.0.3) (2019-09-26) 206 | 207 | 208 | ### Bug Fixes 209 | 210 | * **package:** update eslint-plugin-unicorn to version 12.0.1 ([0cd0076](https://github.com/ChocPanda/eslint-config-xo-vue/commit/0cd0076)), closes [#22](https://github.com/ChocPanda/eslint-config-xo-vue/issues/22) 211 | 212 | ## [2.0.2](https://github.com/ChocPanda/eslint-config-xo-vue/compare/v2.0.1...v2.0.2) (2019-07-26) 213 | 214 | 215 | ### Bug Fixes 216 | 217 | * **package:** update eslint-plugin-unicorn to version 10.0.0 ([6e339ae](https://github.com/ChocPanda/eslint-config-xo-vue/commit/6e339ae)) 218 | 219 | ## [2.0.1](https://github.com/ChocPanda/eslint-config-xo-vue/compare/v2.0.0...v2.0.1) (2019-07-13) 220 | 221 | 222 | ### Bug Fixes 223 | 224 | * Add eslint-plugin-unicorn as a direct dependency for use with xo ([2b36d19](https://github.com/ChocPanda/eslint-config-xo-vue/commit/2b36d19)), closes [#12](https://github.com/ChocPanda/eslint-config-xo-vue/issues/12) 225 | 226 | # [2.0.0](https://github.com/ChocPanda/eslint-config-xo-vue/compare/v1.1.1...v2.0.0) (2019-07-01) 227 | 228 | 229 | ### Build System 230 | 231 | * Update rollup config ([4b61c6b](https://github.com/ChocPanda/eslint-config-xo-vue/commit/4b61c6b)) 232 | 233 | 234 | ### BREAKING CHANGES 235 | 236 | * Update output to remove cache prevention 237 | 238 | ## [1.1.1](https://github.com/ChocPanda/eslint-config-xo-vue/compare/v1.1.0...v1.1.1) (2019-07-01) 239 | 240 | 241 | ### Bug Fixes 242 | 243 | * Add eslint-plugin-unicorn as an optional dependency and add configuration for vue ([d5a2423](https://github.com/ChocPanda/eslint-config-xo-vue/commit/d5a2423)) 244 | 245 | # [1.1.0](https://github.com/ChocPanda/eslint-config-xo-vue/compare/v1.0.8...v1.1.0) (2019-06-08) 246 | 247 | 248 | ### Features 249 | 250 | * Add import configuration ([848dbde](https://github.com/ChocPanda/eslint-config-xo-vue/commit/848dbde)) 251 | 252 | ## [1.0.8](https://github.com/ChocPanda/eslint-config-xo-vue/compare/v1.0.7...v1.0.8) (2019-06-08) 253 | 254 | 255 | ### Bug Fixes 256 | 257 | * Make changes for compatibility with prettier ([f2ffd5f](https://github.com/ChocPanda/eslint-config-xo-vue/commit/f2ffd5f)) 258 | 259 | ## [1.0.7](https://github.com/ChocPanda/eslint-config-xo-vue/compare/v1.0.6...v1.0.7) (2019-06-08) 260 | 261 | 262 | ### Bug Fixes 263 | 264 | * Remove some unpublished configuration ([da144a5](https://github.com/ChocPanda/eslint-config-xo-vue/commit/da144a5)) 265 | 266 | ## [1.0.6](https://github.com/ChocPanda/eslint-config-xo-vue/compare/v1.0.5...v1.0.6) (2019-06-08) 267 | 268 | 269 | ### Bug Fixes 270 | 271 | * Fix exports config ([c583a4a](https://github.com/ChocPanda/eslint-config-xo-vue/commit/c583a4a)) 272 | 273 | ## [1.0.5](https://github.com/ChocPanda/eslint-config-xo-vue/compare/v1.0.4...v1.0.5) (2019-06-08) 274 | 275 | 276 | ### Bug Fixes 277 | 278 | * Update rollup config to hopefully fix export ([fda7ed1](https://github.com/ChocPanda/eslint-config-xo-vue/commit/fda7ed1)) 279 | 280 | ## [1.0.4](https://github.com/ChocPanda/eslint-config-xo-vue/compare/v1.0.3...v1.0.4) (2019-06-08) 281 | 282 | 283 | ### Bug Fixes 284 | 285 | * **rollup:** Rollup, ignore common js conditional require ([86ec547](https://github.com/ChocPanda/eslint-config-xo-vue/commit/86ec547)) 286 | 287 | ## [1.0.3](https://github.com/ChocPanda/eslint-config-xo-vue/compare/v1.0.2...v1.0.3) (2019-06-08) 288 | 289 | 290 | ### Bug Fixes 291 | 292 | * Remove main configuration from package.json to release spaces sub module ([005ef5d](https://github.com/ChocPanda/eslint-config-xo-vue/commit/005ef5d)) 293 | 294 | ## [1.0.2](https://github.com/ChocPanda/eslint-config-xo-vue/compare/v1.0.1...v1.0.2) (2019-06-08) 295 | 296 | 297 | ### Bug Fixes 298 | 299 | * **build:** Add assets config in an attempt to fix build ([30f6aae](https://github.com/ChocPanda/eslint-config-xo-vue/commit/30f6aae)) 300 | * travis config ([dfc8687](https://github.com/ChocPanda/eslint-config-xo-vue/commit/dfc8687)) 301 | 302 | ## [1.0.1](https://github.com/ChocPanda/eslint-config-xo-vue/compare/v1.0.0...v1.0.1) (2019-06-07) 303 | 304 | 305 | ### Bug Fixes 306 | 307 | * **build:** Attempt to fix the release build ([822ea6a](https://github.com/ChocPanda/eslint-config-xo-vue/commit/822ea6a)) 308 | 309 | # 1.0.0 (2019-06-07) 310 | 311 | 312 | ### Features 313 | 314 | * First version of the config for tabs ([2ddf3a1](https://github.com/ChocPanda/eslint-config-xo-vue/commit/2ddf3a1)) 315 | * **spaces:** Create a spaces config ([47ca6b0](https://github.com/ChocPanda/eslint-config-xo-vue/commit/47ca6b0)) 316 | * **v1:** Start creating the config ([12a9d38](https://github.com/ChocPanda/eslint-config-xo-vue/commit/12a9d38)) 317 | 318 | 319 | ### BREAKING CHANGES 320 | 321 | * **spaces:** Add a new config for use of spaces 322 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | 3 | First things first, thank you for your contribution. It's easy to forget to say but I, the other contributors and all the users value the contributions made to the library; small or large all contributions are valued and welcome. 4 | 5 | When contributing to this repository, please first discuss the change you wish to make via [github issues](https://github.com/ChocPanda/eslint-config-xo-vue/issues), maybe someone has the same idea as you and just up-voting would be a contribution towards prioritisation. You may also find the work has already begun and you can help by teaming up with another contributor. 6 | 7 | Please note we have a [code of conduct](#code-of-conduct), please follow it in all your interactions with the project. 8 | 9 | ## Pull Request Process 10 | 11 | 1. Checkout [github issues](https://github.com/ChocPanda/eslint-config-xo-vue/issues) to see if your request has already been made 12 | 2. [Raise a bug](https://github.com/ChocPanda/eslint-config-xo-vue/issues/new?assignees=&labels=&template=bug_report.md&title=) or [feature request](https://github.com/ChocPanda/eslint-config-xo-vue/issues/new?assignees=&labels=&template=feature_request.md&title=) using the appropriate [template](https://github.com/ChocPanda/eslint-config-xo-vue/issues/new/choose). 13 | 3. Assign the task to yourself so we know your working on it, and can pitch in. 14 | 4. Create a branch, and make it happen :persevere: 15 | - Ensure you're branch is appropriately tested, `yarn run test` or `yarn run test:report` to get coverage data 16 | - Linted according to the [xo config](https://github.com/xojs/xo) with `yarn lint:fix` 17 | 5. Update the README.md with details of the changes. 18 | 6. Ensure you're using our [convential commits](./README.md#conventional-commits) for your commit messages 19 | 7. Versioning and tagging are handled by Circle ci so no need to manually do anything there for the release 20 | 8. [RAISE THE PR](https://github.com/ChocPanda/eslint-config-xo-vue/compare) 21 | 9. You may merge the Pull Request in once you have the sign-off, or if you do not have permission to do that just poke the author. 22 | 23 | ## Code of Conduct 24 | 25 | ### Our Pledge 26 | 27 | In the interest of fostering an open and welcoming environment, we as 28 | contributors and maintainers pledge to making participation in our project and 29 | our community a harassment-free experience for everyone, regardless of age, body 30 | size, disability, ethnicity, gender identity and expression, level of experience, 31 | nationality, personal appearance, race, religion, or sexual identity and 32 | orientation. 33 | 34 | ### Our Standards 35 | 36 | Examples of behavior that contributes to creating a positive environment 37 | include: 38 | 39 | - Using welcoming and inclusive language 40 | - Being respectful of differing viewpoints and experiences 41 | - Gracefully accepting constructive criticism 42 | - Focusing on what is best for the community 43 | - Showing empathy towards other community members 44 | 45 | Examples of unacceptable behavior by participants include: 46 | 47 | - The use of sexualized language or imagery and unwelcome sexual attention or advances 48 | - Trolling, insulting/derogatory comments, and personal or political attacks 49 | - Public or private harassment 50 | - Publishing others' private information, such as a physical or electronic address, without explicit permission 51 | - Other conduct which could reasonably be considered inappropriate in a professional setting 52 | 53 | ### Our Responsibilities 54 | 55 | Project maintainers are responsible for clarifying the standards of acceptable 56 | behavior and are expected to take appropriate and fair corrective action in 57 | response to any instances of unacceptable behavior. 58 | 59 | Project maintainers have the right and responsibility to remove, edit, or 60 | reject comments, commits, code, wiki edits, issues, and other contributions 61 | that are not aligned to this Code of Conduct, or to ban temporarily or 62 | permanently any contributor for other behaviors that they deem inappropriate, 63 | threatening, offensive, or harmful. 64 | 65 | ### Scope 66 | 67 | This Code of Conduct applies both within project spaces and in public spaces 68 | when an individual is representing the project or its community. Examples of 69 | representing a project or community include using an official project e-mail 70 | address, posting via an official social media account, or acting as an appointed 71 | representative at an online or offline event. Representation of a project may be 72 | further defined and clarified by project maintainers. 73 | 74 | ### Attribution 75 | 76 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, 77 | available at [http://contributor-covenant.org/version/1/4][version] 78 | 79 | [homepage]: http://contributor-covenant.org 80 | [version]: http://contributor-covenant.org/version/1/4/ -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 Matt Searle 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # eslint-config-xo-vue 2 | 3 |

4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | npm 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 |

29 | 30 | > ESLint [shareable config](http://eslint.org/docs/developer-guide/shareable-configs.html) for vue to be used with [eslint-config-xo](https://github.com/xojs/eslint-config-xo) 31 | 32 | ## Install 33 | 34 | To use with an eslint: 35 | 36 | ``` 37 | $ npm install --save-dev eslint-config-xo eslint-config-xo-vue eslint-plugin-vue 38 | ``` 39 | 40 | ``` 41 | $ yarn add --dev eslint-config-xo eslint-config-xo-vue eslint-plugin-vue 42 | ``` 43 | 44 | I recommend using with [xo](#Use-with-XO) 45 | 46 | ## Usage 47 | 48 | Add some ESLint config to your package.json: 49 | 50 | ```json 51 | { 52 | "name": "my-awesome-project", 53 | "eslintConfig": { 54 | "extends": [ 55 | "xo", 56 | "xo-vue" 57 | ] 58 | } 59 | } 60 | ``` 61 | 62 | Or to .eslintrc: 63 | 64 | ```json 65 | { 66 | "extends": [ 67 | "xo", 68 | "xo-vue" 69 | ] 70 | } 71 | ``` 72 | 73 | Use the `space` sub-config if you want 2 space indentation instead of tabs: 74 | 75 | ```json 76 | { 77 | "extends": [ 78 | "xo", 79 | "xo-vue/space" 80 | ] 81 | } 82 | ``` 83 | 84 | You can also mix it with a [XO](https://github.com/xojs/xo) sub-config: 85 | 86 | ```json 87 | { 88 | "extends": [ 89 | "xo/esnext", 90 | "xo-vue" 91 | ] 92 | } 93 | ``` 94 | 95 | ### WARNING 96 | 97 | When running eslint be sure to add the [--ext vue](https://eslint.org/docs/user-guide/configuring#specifying-file-extensions-to-lint) command line param 98 | 99 | ## Tip 100 | 101 | ### Use with XO 102 | 103 | ``` 104 | $ npm install --save-dev xo eslint-config-xo-vue eslint-plugin-vue 105 | ``` 106 | 107 | ``` 108 | $ yarn add --dev xo eslint-config-xo-vue eslint-plugin-vue 109 | ``` 110 | 111 | ```json 112 | { 113 | "name": "my-awesome-project", 114 | "xo": { 115 | "extends": "xo-vue", 116 | "extensions": ["js", "vue"] 117 | } 118 | } 119 | ``` 120 | 121 | ## Known Issues 122 | 123 | Hoping you'll report any you find, checkout [github issues](https://github.com/ChocPanda/eslint-config-xo-vue/issues) 124 | 125 | ## Related 126 | 127 | - [eslint-config-xo](https://github.com/xojs/eslint-config-xo) - ESLint shareable config for XO 128 | - [XO](https://github.com/xojs/xo) 129 | 130 | ## Contributions 131 | 132 | See our [contributing doc](./CONTRIBUTING.md), be sure to checkout the [code of conduct](./CONTRIBUTING.md#code-of-conduct) 133 | 134 | ### Conventional Commits 135 | 136 | This project uses [conventional commits](https://www.conventionalcommits.org/en/v1.0.0-beta.3/#specification) to manage versions and releases of the library therefore when making a commit please use `yarn commit ` and this will guide you through writing a conventional commit message which can be understood work with the ci pipeline 137 | -------------------------------------------------------------------------------- /ava.config.js: -------------------------------------------------------------------------------- 1 | export default { 2 | failFast: false, 3 | failWithoutAssertions: true, 4 | verbose: true 5 | }; 6 | -------------------------------------------------------------------------------- /nyc.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | 'check-coverage': true, 3 | 'per-file': true, 4 | lines: 75, 5 | statements: 75, 6 | functions: 75, 7 | branches: 75, 8 | watermarks: { 9 | lines: [80, 95], 10 | functions: [80, 95], 11 | branches: [80, 95], 12 | statements: [80, 95] 13 | }, 14 | include: ['src/**/*.js'], 15 | exclude: ['src/**/*.test.js', 'src/**/index.js'], 16 | reporter: ['lcov', 'text-summary'], 17 | cache: true, 18 | all: true, 19 | 'report-dir': './reports/coverage' 20 | }; 21 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "eslint-config-xo-vue", 3 | "version": "1.1.1", 4 | "description": "Official ESLint shareable config for Vue to be used with eslint-config-xo https://github.com/xojs/xo", 5 | "repository": "https://github.com/ChocPanda/eslint-config-xo-vue", 6 | "author": "ChocPanda", 7 | "main": "src/index.js", 8 | "license": "MIT", 9 | "private": false, 10 | "scripts": { 11 | "commit": "git-cz", 12 | "build": "rollup -c", 13 | "postpublish": "cp -r package.json ..", 14 | "test": "ava", 15 | "test:unit": "ava", 16 | "test:cov": "nyc ava && nyc report", 17 | "test:report": "nyc ava --tap | tap-junit --output ./reports/ava --name test-results.xml", 18 | "lint": "xo", 19 | "lint:test": "xo", 20 | "lint:fix": "xo --fix", 21 | "lint:report": "xo --reporter junit > ./reports/xo/test-results.xml", 22 | "release": "semantic-release", 23 | "clean": "rimraf dist && rimraf node_modules", 24 | "snyk-protect": "snyk protect", 25 | "prepare": "yarn run snyk-protect" 26 | }, 27 | "files": [ 28 | "index.js", 29 | "spaces.js" 30 | ], 31 | "engines": { 32 | "node": ">=10" 33 | }, 34 | "keywords": [ 35 | "❤️", 36 | "vue", 37 | "vuejs", 38 | "eslintconfig", 39 | "xo", 40 | "xoxo", 41 | "hugs", 42 | "kisses", 43 | "happy", 44 | "happiness", 45 | "code", 46 | "quality", 47 | "style", 48 | "lint", 49 | "linter", 50 | "jscs", 51 | "jshint", 52 | "jslint", 53 | "eslint", 54 | "validate", 55 | "code style", 56 | "standard", 57 | "strict", 58 | "check", 59 | "checker", 60 | "verify", 61 | "enforce", 62 | "hint", 63 | "simple" 64 | ], 65 | "xo": { 66 | "prettier": "true", 67 | "rules": { 68 | "unicorn/prevent-abbreviations": [ 69 | "warn", 70 | { 71 | "whitelist": { 72 | "src": true, 73 | "dest": true, 74 | "env": true, 75 | "props": true, 76 | "assetsDir": true, 77 | "tarballDir": true, 78 | "pkgRoot": true 79 | } 80 | } 81 | ] 82 | } 83 | }, 84 | "config": { 85 | "path": "./node_modules/cz-conventional-changelog", 86 | "commitizen": { 87 | "path": "./node_modules/cz-conventional-changelog" 88 | } 89 | }, 90 | "devDependencies": { 91 | "@rollup/plugin-commonjs": "^11.0.2", 92 | "@rollup/plugin-node-resolve": "^7.1.1", 93 | "@semantic-release/changelog": "^5.0.0", 94 | "@semantic-release/git": "^9.0.0", 95 | "ava": "^3.5.0", 96 | "commitizen": "^4.0.3", 97 | "cz-conventional-changelog": "3.1.0", 98 | "nyc": "^15.0.0", 99 | "rimraf": "^3.0.2", 100 | "rollup": "^2.0.2", 101 | "rollup-plugin-copy": "^3.3.0", 102 | "rollup-plugin-license": "^0.13.0", 103 | "rollup-plugin-peer-deps-external": "^2.2.2", 104 | "semantic-release": "^17.0.4", 105 | "xo": "^0.27.2" 106 | }, 107 | "peerDependencies": { 108 | "eslint": ">=6", 109 | "eslint-config-xo": "^0.29.1", 110 | "eslint-plugin-vue": "^6.2.1" 111 | }, 112 | "dependencies": { 113 | "eslint-plugin-unicorn": "^16.1.1", 114 | "snyk": "^1.996.0", 115 | "vue-eslint-parser": "^7.2.0" 116 | }, 117 | "snyk": true 118 | } 119 | -------------------------------------------------------------------------------- /prettier.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | bracketSpacing: true 3 | }; 4 | -------------------------------------------------------------------------------- /release.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | branch: 'master', 3 | plugins: [ 4 | '@semantic-release/commit-analyzer', 5 | '@semantic-release/release-notes-generator', 6 | [ 7 | '@semantic-release/changelog', 8 | { 9 | changelogFile: 'CHANGELOG.md' 10 | } 11 | ], 12 | [ 13 | '@semantic-release/npm', 14 | { 15 | tarballDir: 'dist', 16 | pkgRoot: 'dist' 17 | } 18 | ], 19 | [ 20 | '@semantic-release/git', 21 | { 22 | message: 23 | 'chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}' // eslint-disable-line no-template-curly-in-string 24 | } 25 | ], 26 | [ 27 | '@semantic-release/github', 28 | { 29 | assets: 'dist/*.tgz' 30 | } 31 | ] 32 | ] 33 | }; 34 | -------------------------------------------------------------------------------- /rollup.config.js: -------------------------------------------------------------------------------- 1 | import path from 'path'; 2 | 3 | import resolve from '@rollup/plugin-node-resolve'; 4 | import commonjs from '@rollup/plugin-commonjs'; 5 | import license from 'rollup-plugin-license'; 6 | import copy from 'rollup-plugin-copy'; 7 | import peerDeps from 'rollup-plugin-peer-deps-external'; 8 | 9 | const plugins = [ 10 | resolve(), 11 | commonjs({ ignore: ['conditional-runtime-dependency'] }), 12 | peerDeps(), 13 | license({ 14 | banner: { 15 | file: path.join(__dirname, 'LICENSE') 16 | } 17 | }), 18 | copy({ 19 | targets: [ 20 | { src: 'package.json', dest: 'dist/' }, 21 | { src: 'README.md', dest: 'dist/' }, 22 | { src: 'CHANGELOG.md', dest: 'dist/' } 23 | ], 24 | outputFolder: 'dist' 25 | }) 26 | ]; 27 | 28 | const external = [ 29 | 'eslint', 30 | 'eslint-config-xo', 31 | 'eslint-plugin-vue', 32 | 'eslint-plugin-unicorn' 33 | ]; 34 | 35 | export default [ 36 | { 37 | input: 'src/index.js', 38 | output: { 39 | file: 'dist/index.js', 40 | format: 'cjs', 41 | preferConst: true 42 | }, 43 | external, 44 | plugins 45 | }, 46 | { 47 | input: 'src/spaces.js', 48 | output: { 49 | file: 'dist/spaces.js', 50 | format: 'cjs', 51 | preferConst: true 52 | }, 53 | external, 54 | plugins 55 | } 56 | ]; 57 | -------------------------------------------------------------------------------- /src/base.js: -------------------------------------------------------------------------------- 1 | const xoConfigRules = require('eslint-config-xo').rules; 2 | 3 | module.exports = indent => { 4 | const defaultConfig = { 5 | parser: require.resolve('vue-eslint-parser'), 6 | parserOptions: { 7 | ecmaVersion: 2018, 8 | sourceType: 'module', 9 | ecmaFeatures: { 10 | jsx: true 11 | } 12 | }, 13 | env: { 14 | browser: true, 15 | es6: true 16 | }, 17 | plugins: ['vue'], 18 | rules: { 19 | 'vue/attribute-hyphenation': ['error', 'always'], 20 | 'vue/attributes-order': 'warn', 21 | 'vue/block-spacing': 'warn', 22 | 'vue/brace-style': xoConfigRules['brace-style'], 23 | 'vue/camelcase': xoConfigRules.camelcase, 24 | 'vue/comma-dangle': xoConfigRules['comma-dangle'], 25 | 'vue/comment-directive': ['error'], 26 | 'vue/component-name-in-template-casing': [ 27 | 'error', 28 | 'PascalCase', 29 | { registeredComponentsOnly: false } 30 | ], 31 | 'vue/dot-location': xoConfigRules['dot-location'], 32 | 'vue/eqeqeq': xoConfigRules.eqeqeq, 33 | 'vue/html-closing-bracket-newline': [ 34 | 'error', 35 | { 36 | singleline: 'never', 37 | multiline: 'always' 38 | } 39 | ], 40 | 'vue/html-closing-bracket-spacing': [ 41 | 'error', 42 | { 43 | startTag: 'never', 44 | endTag: 'never', 45 | selfClosingTag: 'always' 46 | } 47 | ], 48 | 'vue/html-end-tags': ['error'], 49 | 'vue/html-indent': [ 50 | 'error', 51 | indent, 52 | { 53 | attribute: 1, 54 | baseIndent: 1, 55 | closeBracket: 0, 56 | alignAttributesVertically: true 57 | } 58 | ], 59 | 'vue/html-quotes': ['error', 'double'], 60 | 'vue/html-self-closing': [ 61 | 'error', 62 | { 63 | html: { 64 | void: 'always', 65 | normal: 'always', 66 | component: 'always' 67 | }, 68 | svg: 'always', 69 | math: 'always' 70 | } 71 | ], 72 | 'vue/jsx-uses-vars': ['error'], 73 | 'vue/key-spacing': xoConfigRules['key-spacing'], 74 | 'vue/keyword-spacing': xoConfigRules['keyword-spacing'], 75 | 'vue/match-component-file-name': [ 76 | 'error', 77 | { 78 | extensions: ['jsx', 'vue'], 79 | shouldMatchCase: true 80 | } 81 | ], 82 | 'vue/max-attributes-per-line': [ 83 | 'error', 84 | { 85 | singleline: 3, 86 | multiline: { 87 | max: 1, 88 | allowFirstLine: false 89 | } 90 | } 91 | ], 92 | 'vue/multiline-html-element-content-newline': [ 93 | 'error', 94 | { 95 | ignoreWhenEmpty: true 96 | } 97 | ], 98 | 'vue/mustache-interpolation-spacing': ['error', 'always'], 99 | 'vue/name-property-casing': ['error', 'PascalCase'], 100 | 'vue/no-async-in-computed-properties': ['error'], 101 | 'vue/no-boolean-default': ['error', 'no-default'], 102 | 'vue/no-deprecated-scope-attribute': 'warn', 103 | 'vue/no-empty-pattern': xoConfigRules['no-empty-pattern'], 104 | 'vue/no-use-v-if-with-v-for': [ 105 | 'error', 106 | { 107 | allowUsingIterationVar: false 108 | } 109 | ], 110 | 'vue/no-dupe-keys': ['error'], 111 | 'vue/no-duplicate-attributes': [ 112 | 'error', 113 | { 114 | allowCoexistClass: true, 115 | allowCoexistStyle: true 116 | } 117 | ], 118 | 'vue/no-multi-spaces': xoConfigRules['no-multi-spaces'], 119 | 'vue/no-parsing-error': ['error'], 120 | 'vue/no-reserved-keys': ['error'], 121 | 'vue/no-restricted-syntax': ['error'], 122 | 'vue/no-shared-component-data': ['error'], 123 | 'vue/no-side-effects-in-computed-properties': ['error'], 124 | 'vue/no-spaces-around-equal-signs-in-attribute': ['error'], 125 | 'vue/no-template-key': ['error'], 126 | 'vue/no-template-shadow': ['error'], 127 | 'vue/no-textarea-mustache': ['error'], 128 | 'vue/no-unused-components': [ 129 | 'error', 130 | { 131 | ignoreWhenBindingPresent: true 132 | } 133 | ], 134 | 'vue/no-unused-vars': ['error'], 135 | 'vue/no-v-html': ['error'], 136 | 'vue/object-curly-spacing': xoConfigRules['object-curly-spacing'], 137 | 'vue/order-in-components': [ 138 | 'warn', 139 | { 140 | order: [ 141 | 'el', 142 | 'name', 143 | 'parent', 144 | 'functional', 145 | ['delimiters', 'comments'], 146 | ['components', 'directives', 'filters'], 147 | 'extends', 148 | 'mixins', 149 | 'inheritAttrs', 150 | 'model', 151 | ['props', 'propsData'], 152 | 'data', 153 | 'computed', 154 | 'watch', 155 | 'LIFECYCLE_HOOKS', 156 | 'methods', 157 | ['template', 'render'], 158 | 'renderError' 159 | ] 160 | } 161 | ], 162 | 'vue/prop-name-casing': ['error', 'camelCase'], 163 | 'vue/require-component-is': ['error'], 164 | 'vue/require-default-prop': ['error'], 165 | 'vue/require-direct-export': ['warn'], 166 | 'vue/require-prop-type-constructor': ['error'], 167 | 'vue/require-prop-types': ['error'], 168 | 'vue/require-render-return': ['error'], 169 | 'vue/require-v-for-key': ['error'], 170 | 'vue/require-valid-default-prop': ['error'], 171 | 'vue/return-in-computed-property': [ 172 | 'error', 173 | { 174 | treatUndefinedAsUnspecified: true 175 | } 176 | ], 177 | 'vue/script-indent': [ 178 | 'error', 179 | indent, 180 | { 181 | baseIndent: 0, 182 | switchCase: 1 183 | } 184 | ], 185 | 'vue/singleline-html-element-content-newline': [ 186 | 'error', 187 | { 188 | ignoreWhenNoAttributes: true, 189 | ignoreWhenEmpty: true, 190 | ignores: ['pre', 'textarea'] 191 | } 192 | ], 193 | 'vue/space-infix-ops': xoConfigRules['space-infix-ops'], 194 | 'vue/space-unary-ops': xoConfigRules['space-unary-ops'], 195 | 'vue/this-in-template': ['error', 'never'], 196 | 'vue/use-v-on-exact': ['error'], 197 | 'vue/v-bind-style': ['error', 'shorthand'], 198 | 'vue/v-on-function-call': ['error', 'always'], 199 | 'vue/v-on-style': ['error', 'shorthand'], 200 | 'vue/valid-template-root': ['error'], 201 | 'vue/valid-v-bind': ['error'], 202 | 'vue/valid-v-cloak': ['error'], 203 | 'vue/valid-v-else-if': ['error'], 204 | 'vue/valid-v-else': ['error'], 205 | 'vue/valid-v-for': ['error'], 206 | 'vue/valid-v-html': ['error'], 207 | 'vue/valid-v-if': ['error'], 208 | 'vue/valid-v-model': ['error'], 209 | 'vue/valid-v-on': ['error'], 210 | 'vue/valid-v-once': ['error'], 211 | 'vue/valid-v-pre': ['error'], 212 | 'vue/valid-v-show': ['error'], 213 | 'vue/valid-v-slot': ['error'], 214 | 'vue/v-slot-style': ['warn'], 215 | 'vue/valid-v-text': ['error'], 216 | 'import/no-unresolved': ['error'] 217 | } 218 | }; 219 | 220 | try { 221 | // Test whether unicorn config is in scope 222 | // eslint-disable-next-line no-unused-vars 223 | const _ = require('eslint-plugin-unicorn'); 224 | return { 225 | ...defaultConfig, 226 | rules: { 227 | ...defaultConfig.rules, 228 | 'unicorn/prevent-abbreviations': [ 229 | 'error', 230 | { 231 | whitelist: { 232 | props: true, 233 | assetsDir: true 234 | } 235 | } 236 | ], 237 | 'unicorn/filename-case': [ 238 | 'warn', 239 | { 240 | cases: { 241 | pascalCase: true, 242 | kebabCase: true 243 | } 244 | } 245 | ] 246 | } 247 | }; 248 | } catch (error) { 249 | console.log('eslint-plugin-unicorn is unavailable', error); 250 | } 251 | 252 | return defaultConfig; 253 | }; 254 | -------------------------------------------------------------------------------- /src/index.js: -------------------------------------------------------------------------------- 1 | module.exports = require('./base')('tab'); 2 | -------------------------------------------------------------------------------- /src/spaces.js: -------------------------------------------------------------------------------- 1 | module.exports = require('./base')(2); 2 | -------------------------------------------------------------------------------- /test/test.js: -------------------------------------------------------------------------------- 1 | const test = require('ava'); 2 | 3 | test.todo('Write some tests'); 4 | --------------------------------------------------------------------------------