This commit is contained in:
darenhsu
2022-07-17 13:16:16 +08:00
parent 84759556ff
commit befd344ab0
28070 changed files with 4008428 additions and 1 deletions
+97
View File
@@ -0,0 +1,97 @@
# Change Log
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
# [3.0.0](https://github.com/nuxt/eslint-config/compare/@nuxtjs/eslint-config@2.0.2...@nuxtjs/eslint-config@3.0.0) (2020-05-12)
### Bug Fixes
* eslint-plugin-import ordering errors in windows ([39ad2b4](https://github.com/nuxt/eslint-config/commit/39ad2b46da470198f71ba111ee23d9b037a49a75))
## [2.0.2](https://github.com/nuxt/eslint-config/compare/@nuxtjs/eslint-config@2.0.1...@nuxtjs/eslint-config@2.0.2) (2020-02-09)
### Bug Fixes
* eslint-plugin-import ordering errors in windows ([4f6f4a9](https://github.com/nuxt/eslint-config/commit/4f6f4a9566149e438bfdf9046f82151e050d7ce7))
## [2.0.1](https://github.com/nuxt/eslint-config/compare/@nuxtjs/eslint-config@2.0.0...@nuxtjs/eslint-config@2.0.1) (2020-02-09)
**Note:** Version bump only for package @nuxtjs/eslint-config
# [2.0.0](https://github.com/nuxt/eslint-config/compare/@nuxtjs/eslint-config@1.1.2...@nuxtjs/eslint-config@2.0.0) (2019-11-26)
### Features
* update eslint config packages ([a3bb0bf](https://github.com/nuxt/eslint-config/commit/a3bb0bfb923f18fd11447e048a29d11f29a3aa75))
## [1.1.2](https://github.com/nuxt/eslint-config/compare/@nuxtjs/eslint-config@1.1.1...@nuxtjs/eslint-config@1.1.2) (2019-08-10)
**Note:** Version bump only for package @nuxtjs/eslint-config
## [1.1.1](https://github.com/nuxt/eslint-config/compare/@nuxtjs/eslint-config@1.1.0...@nuxtjs/eslint-config@1.1.1) (2019-08-10)
**Note:** Version bump only for package @nuxtjs/eslint-config
# 1.1.0 (2019-08-10)
## Features
* warn console and debugger in dev ([#56](https://github.com/nuxt/eslint-config/issues/56))
### [1.0.1](https://github.com/nuxt/eslint-config/compare/v1.0.0...v1.0.1) (2019-07-07)
### Bug Fixes
* move eslint plugins from peerDeps to deps ([4e8d231](https://github.com/nuxt/eslint-config/commit/4e8d231))
<a name="1.0.0"></a>
# [1.0.0](https://github.com/nuxt/eslint-config/compare/v0.0.1...v1.0.0) (2019-07-07)
### Bug Fixes
* avoid changing basic StandardJS rules ([#25](https://github.com/nuxt/eslint-config/issues/25)) ([38e3582](https://github.com/nuxt/eslint-config/commit/38e3582))
### Features
* add eslint-plugin-unicorn rules ([#35](https://github.com/nuxt/eslint-config/issues/35)) ([03bb05f](https://github.com/nuxt/eslint-config/commit/03bb05f))
* conditional no-console based on env ([#2](https://github.com/nuxt/eslint-config/issues/2)) ([60826b7](https://github.com/nuxt/eslint-config/commit/60826b7))
* force object shorthand ([#29](https://github.com/nuxt/eslint-config/issues/29)) ([b149bc2](https://github.com/nuxt/eslint-config/commit/b149bc2))
* prohibit useless renaming ([#28](https://github.com/nuxt/eslint-config/issues/28)) ([79c9de7](https://github.com/nuxt/eslint-config/commit/79c9de7))
<a name="0.0.1"></a>
## 0.0.1 (2018-10-12)
+21
View File
@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2019 Nuxt.js
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
+132
View File
@@ -0,0 +1,132 @@
module.exports = {
env: {
browser: true,
node: true,
'jest/globals': true
},
extends: [
'standard',
'plugin:import/errors',
'plugin:import/warnings',
'plugin:vue/recommended'
],
plugins: [
'jest',
'unicorn',
'vue'
],
settings: {
'import/resolver': {
node: { extensions: ['.js', '.mjs'] }
}
},
rules: {
/**********************/
/* General Code Rules */
/**********************/
// Enforce import order
'import/order': 'error',
// Imports should come first
'import/first': 'error',
// Other import rules
'import/no-mutable-exports': 'error',
// Allow unresolved imports
'import/no-unresolved': 'off',
// Allow paren-less arrow functions only when there's no braces
'arrow-parens': ['error', 'as-needed', { requireForBlockBody: true }],
// Allow async-await
'generator-star-spacing': 'off',
// Allow debugger during development
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'warn',
'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'warn',
// Prefer const over let
'prefer-const': ['error', {
destructuring: 'any',
ignoreReadBeforeAssign: false
}],
// No single if in an "else" block
'no-lonely-if': 'error',
// Force curly braces for control flow,
// including if blocks with a single statement
curly: ['error', 'all'],
// No async function without await
'require-await': 'error',
// Force dot notation when possible
'dot-notation': 'error',
'no-var': 'error',
// Force object shorthand where possible
'object-shorthand': 'error',
// No useless destructuring/importing/exporting renames
'no-useless-rename': 'error',
/**********************/
/* Unicorn Rules */
/**********************/
// Pass error message when throwing errors
'unicorn/error-message': 'error',
// Uppercase regex escapes
'unicorn/escape-case': 'error',
// Array.isArray instead of instanceof
'unicorn/no-array-instanceof': 'error',
// Prevent deprecated `new Buffer()`
'unicorn/no-new-buffer': 'error',
// Keep regex literals safe!
'unicorn/no-unsafe-regex': 'off',
// Lowercase number formatting for octal, hex, binary (0x12 instead of 0X12)
'unicorn/number-literal-case': 'error',
// ** instead of Math.pow()
'unicorn/prefer-exponentiation-operator': 'error',
// includes over indexOf when checking for existence
'unicorn/prefer-includes': 'error',
// String methods startsWith/endsWith instead of more complicated stuff
'unicorn/prefer-starts-ends-with': 'error',
// textContent instead of innerText
'unicorn/prefer-text-content': 'error',
// Enforce throwing type error when throwing error while checking typeof
'unicorn/prefer-type-error': 'error',
// Use new when throwing error
'unicorn/throw-new-error': 'error',
/**********************/
/* Vue Rules */
/**********************/
// Disable template errors regarding invalid end tags
'vue/no-parsing-error': ['error', {
'x-invalid-end-tag': false
}],
// Maximum 5 attributes per line instead of one
'vue/max-attributes-per-line': ['error', {
singleline: 5
}]
}
}
+71
View File
@@ -0,0 +1,71 @@
{
"_args": [
[
"@nuxtjs/eslint-config@3.0.0",
"/mnt/Foxconn/Digitalent/Deverloper/liff-push_2series"
]
],
"_development": true,
"_from": "@nuxtjs/eslint-config@3.0.0",
"_id": "@nuxtjs/eslint-config@3.0.0",
"_inBundle": false,
"_integrity": "sha512-sjAyE0jSuk20Q1jalJ1TwUDJXDunmT4jBZe22cVYE9H2zeKcA8CAhEOvbl9713fJXkRrXDIJDOIHVvT8aWMgyw==",
"_location": "/@nuxtjs/eslint-config",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
"raw": "@nuxtjs/eslint-config@3.0.0",
"name": "@nuxtjs/eslint-config",
"escapedName": "@nuxtjs%2feslint-config",
"scope": "@nuxtjs",
"rawSpec": "3.0.0",
"saveSpec": null,
"fetchSpec": "3.0.0"
},
"_requiredBy": [
"#DEV:/",
"/@nuxtjs/eslint-config-typescript"
],
"_resolved": "https://registry.npmjs.org/@nuxtjs/eslint-config/-/eslint-config-3.0.0.tgz",
"_spec": "3.0.0",
"_where": "/mnt/Foxconn/Digitalent/Deverloper/liff-push_2series",
"bugs": {
"url": "https://github.com/nuxt/eslint-config/issues"
},
"contributors": [
{
"name": "Alexander Lichter",
"email": "npm@lichter.io"
}
],
"dependencies": {
"eslint-config-standard": "^14.1.1",
"eslint-plugin-import": "2.19.1",
"eslint-plugin-jest": "^23.10.0",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^4.2.1",
"eslint-plugin-standard": "^4.0.1",
"eslint-plugin-unicorn": "^19.0.1",
"eslint-plugin-vue": "^6.2.2"
},
"description": "Nuxt.js eslint config",
"files": [
"index.js"
],
"gitHead": "173b586031f3ebd8d9b52c0bf369078ebaa598f7",
"homepage": "https://github.com/nuxt/eslint-config/tree/master/packages/eslint-config",
"license": "MIT",
"name": "@nuxtjs/eslint-config",
"peerDependencies": {
"eslint": "^7.0.0"
},
"publishConfig": {
"access": "public"
},
"repository": {
"type": "git",
"url": "git+https://github.com/nuxt/eslint-config.git"
},
"version": "3.0.0"
}