├── .gitignore ├── LICENSE ├── README.md ├── index.js └── package.json /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2016 Evan You 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 13 | all 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 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # DEPRECATED 2 | 3 | This package has been deprecated. The original config is now part of [eslint-plugin-vue-libs](https://github.com/vuejs/eslint-plugin-vue-libs). 4 | 5 | --- 6 | 7 | # eslint-config-vue 8 | 9 | A set of opinionated ESLint (http://eslint.org) rules (all rules included) tailored for Vue internal development. 10 | 11 | ## Usage 12 | 1. `npm install --save-dev eslint-config-vue eslint-plugin-vue` 13 | 2. create a file named `.eslintrc` in your project: 14 | 15 | ```js 16 | { 17 | "extends": "vue" 18 | // Your overrides... 19 | } 20 | ``` 21 | 22 | ## License 23 | 24 | [MIT](http://opensource.org/licenses/MIT) 25 | -------------------------------------------------------------------------------- /index.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | parserOptions: { 3 | ecmaVersion: 6, 4 | ecmaFeatures: { 5 | experimentalObjectRestSpread: true, 6 | jsx: true 7 | }, 8 | sourceType: 'module' 9 | }, 10 | 11 | env: { 12 | es6: true, 13 | node: true 14 | }, 15 | 16 | plugins: ['vue'], 17 | 18 | globals: { 19 | document: false, 20 | navigator: false, 21 | window: false 22 | }, 23 | 24 | rules: { 25 | 'accessor-pairs': 2, 26 | 'arrow-spacing': [2, { 'before': true, 'after': true }], 27 | 'block-spacing': [2, 'always'], 28 | 'brace-style': [2, '1tbs', { 'allowSingleLine': true }], 29 | 'camelcase': [2, { 'properties': 'always' }], 30 | 'comma-dangle': [2, 'never'], 31 | 'comma-spacing': [2, { 'before': false, 'after': true }], 32 | 'comma-style': [2, 'last'], 33 | 'constructor-super': 2, 34 | 'curly': [2, 'multi-line'], 35 | 'dot-location': [2, 'property'], 36 | 'eol-last': 2, 37 | 'eqeqeq': [2, 'allow-null'], 38 | 'generator-star-spacing': [2, { 'before': true, 'after': true }], 39 | 'handle-callback-err': [2, '^(err|error)$' ], 40 | 'indent': [2, 2, { 'SwitchCase': 1 }], 41 | 'jsx-quotes': [2, 'prefer-single'], 42 | 'key-spacing': [2, { 'beforeColon': false, 'afterColon': true }], 43 | 'keyword-spacing': [2, { 'before': true, 'after': true }], 44 | 'new-cap': [2, { 'newIsCap': true, 'capIsNew': false }], 45 | 'new-parens': 2, 46 | 'no-array-constructor': 2, 47 | 'no-caller': 2, 48 | 'no-class-assign': 2, 49 | 'no-cond-assign': 2, 50 | 'no-const-assign': 2, 51 | 'no-control-regex': 2, 52 | 'no-delete-var': 2, 53 | 'no-dupe-args': 2, 54 | 'no-dupe-class-members': 2, 55 | 'no-dupe-keys': 2, 56 | 'no-duplicate-case': 2, 57 | 'no-empty-character-class': 2, 58 | 'no-empty-pattern': 2, 59 | 'no-eval': 2, 60 | 'no-ex-assign': 2, 61 | 'no-extend-native': 2, 62 | 'no-extra-bind': 2, 63 | 'no-extra-boolean-cast': 2, 64 | 'no-extra-parens': [2, 'functions'], 65 | 'no-fallthrough': 2, 66 | 'no-floating-decimal': 2, 67 | 'no-func-assign': 2, 68 | 'no-implied-eval': 2, 69 | 'no-inner-declarations': [2, 'functions'], 70 | 'no-invalid-regexp': 2, 71 | 'no-irregular-whitespace': 2, 72 | 'no-iterator': 2, 73 | 'no-label-var': 2, 74 | 'no-labels': [2, { 'allowLoop': false, 'allowSwitch': false }], 75 | 'no-lone-blocks': 2, 76 | 'no-mixed-spaces-and-tabs': 2, 77 | 'no-multi-spaces': 2, 78 | 'no-multi-str': 2, 79 | 'no-multiple-empty-lines': [2, { 'max': 1 }], 80 | 'no-native-reassign': 2, 81 | 'no-negated-in-lhs': 2, 82 | 'no-new-object': 2, 83 | 'no-new-require': 2, 84 | 'no-new-symbol': 2, 85 | 'no-new-wrappers': 2, 86 | 'no-obj-calls': 2, 87 | 'no-octal': 2, 88 | 'no-octal-escape': 2, 89 | 'no-path-concat': 2, 90 | 'no-proto': 2, 91 | 'no-redeclare': 2, 92 | 'no-regex-spaces': 2, 93 | 'no-return-assign': [2, 'except-parens'], 94 | 'no-self-assign': 2, 95 | 'no-self-compare': 2, 96 | 'no-sequences': 2, 97 | 'no-shadow-restricted-names': 2, 98 | 'no-spaced-func': 2, 99 | 'no-sparse-arrays': 2, 100 | 'no-this-before-super': 2, 101 | 'no-throw-literal': 2, 102 | 'no-trailing-spaces': 2, 103 | 'no-undef': 2, 104 | 'no-undef-init': 2, 105 | 'no-unexpected-multiline': 2, 106 | 'no-unmodified-loop-condition': 2, 107 | 'no-unneeded-ternary': [2, { 'defaultAssignment': false }], 108 | 'no-unreachable': 2, 109 | 'no-unsafe-finally': 2, 110 | 'no-unused-vars': [2, { 'vars': 'all', 'args': 'none' }], 111 | 'no-useless-call': 2, 112 | 'no-useless-computed-key': 2, 113 | 'no-useless-constructor': 2, 114 | 'no-useless-escape': 0, 115 | 'no-whitespace-before-property': 2, 116 | 'no-with': 2, 117 | 'one-var': [2, { 'initialized': 'never' }], 118 | 'operator-linebreak': [2, 'after', { 'overrides': { '?': 'before', ':': 'before' } }], 119 | 'padded-blocks': [2, 'never'], 120 | 'quotes': [2, 'single', { 'avoidEscape': true, 'allowTemplateLiterals': true }], 121 | 'semi': [2, 'never'], 122 | 'semi-spacing': [2, { 'before': false, 'after': true }], 123 | 'space-before-blocks': [2, 'always'], 124 | 'space-before-function-paren': [2, 'always'], 125 | 'space-in-parens': [2, 'never'], 126 | 'space-infix-ops': 2, 127 | 'space-unary-ops': [2, { 'words': true, 'nonwords': false }], 128 | 'spaced-comment': [2, 'always', { 'markers': ['global', 'globals', 'eslint', 'eslint-disable', '*package', '!', ','] }], 129 | 'template-curly-spacing': [2, 'never'], 130 | 'use-isnan': 2, 131 | 'valid-typeof': 2, 132 | 'wrap-iife': [2, 'any'], 133 | 'yield-star-spacing': [2, 'both'], 134 | 'yoda': [2, 'never'], 135 | 'prefer-const': 2, 136 | 'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0, 137 | 'object-curly-spacing': [2, 'always', { objectsInObjects: false }], 138 | 'array-bracket-spacing': [2, 'never'], 139 | 'vue/jsx-uses-vars': 2 140 | } 141 | } 142 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "eslint-config-vue", 3 | "version": "2.0.2", 4 | "description": "eslint config for vue.js projects", 5 | "main": "index.js", 6 | "repository": { 7 | "type": "git", 8 | "url": "git+https://github.com/vuejs/eslint-config-vue.git" 9 | }, 10 | "keywords": [ 11 | "eslint", 12 | "vue" 13 | ], 14 | "author": "Evan You", 15 | "license": "MIT", 16 | "bugs": { 17 | "url": "https://github.com/vuejs/eslint-config-vue/issues" 18 | }, 19 | "homepage": "https://github.com/vuejs/eslint-config-vue#readme", 20 | "peerDependencies": { 21 | "eslint": "^2.0.0 || ^3.0.0", 22 | "eslint-plugin-vue": "^1.0.0 || ^2.0.0" 23 | } 24 | } 25 | --------------------------------------------------------------------------------