feat: add react and all

This commit is contained in:
Anthony Fu 2020-08-12 19:24:32 +08:00
parent b962266ba1
commit a7fbdcad4b
15 changed files with 483 additions and 124 deletions

3
.eslintrc.json Normal file
View File

@ -0,0 +1,3 @@
{
"extends": "@antfu"
}

View File

@ -11,8 +11,8 @@
"release": "lerna publish --conventional-commits --graph-type all -y"
},
"devDependencies": {
"@antfu/eslint-config": "^0.2.13",
"eslint": "^7.4.0",
"@antfu/eslint-config": "workspace:*",
"eslint": "^7.6.0",
"lerna": "^3.22.1",
"typescript": "^3.9.7"
}

6
packages/all/index.js Normal file
View File

@ -0,0 +1,6 @@
module.exports = {
extends: [
'@antfu/eslint-config-react',
'@antfu/eslint-config-vue',
],
}

22
packages/all/package.json Normal file
View File

@ -0,0 +1,22 @@
{
"name": "@antfu/eslint-config",
"version": "0.2.14",
"description": "",
"main": "index.js",
"keywords": [],
"author": "Anthony Fu <anthonyfu117@hotmail.com> (https://github.com/antfu/)",
"license": "MIT",
"files": [
"index.js"
],
"peerDependencies": {
"eslint": ">=7.4.0"
},
"publishConfig": {
"access": "public"
},
"dependencies": {
"@antfu/eslint-config-vue": "workspace:*",
"@antfu/eslint-config-react": "workspace:*"
}
}

View File

@ -10,6 +10,7 @@ module.exports = {
'plugin:import/warnings',
],
plugins: [
'html',
'unicorn',
],
settings: {

View File

@ -1,5 +1,5 @@
{
"name": "@antfu/eslint-config",
"name": "@antfu/eslint-config-basic",
"version": "0.2.14",
"description": "",
"main": "index.js",
@ -20,6 +20,7 @@
},
"dependencies": {
"eslint-config-standard": "^14.1.1",
"eslint-plugin-html": "^6.0.3",
"eslint-plugin-import": "^2.22.0",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^4.2.1",
@ -27,7 +28,6 @@
"eslint-plugin-unicorn": "^21.0.0"
},
"devDependencies": {
"eslint": "^7.0.0"
},
"gitHead": "bd0460759c73f7fcdf32570f40a13e37ab6961c0"
"eslint": "^7.6.0"
}
}

12
packages/react/index.js Normal file
View File

@ -0,0 +1,12 @@
module.exports = {
extends: [
"plugin:react/recommended",
'@antfu/eslint-config-ts',
],
"rules": {
"jsx-quotes": [
"error",
"prefer-double"
]
}
}

View File

@ -0,0 +1,29 @@
{
"name": "@antfu/eslint-config-react",
"version": "0.2.14",
"description": "",
"main": "index.js",
"keywords": [],
"author": "Anthony Fu <anthonyfu117@hotmail.com> (https://github.com/antfu/)",
"license": "MIT",
"scripts": {
"lint": "eslint . --config=index.js"
},
"files": [
"index.js"
],
"peerDependencies": {
"eslint": ">=7.4.0"
},
"publishConfig": {
"access": "public"
},
"dependencies": {
"@antfu/eslint-config-ts": "workspace:*",
"eslint-plugin-react": "^7.20.5"
},
"devDependencies": {
"eslint": "^7.6.0",
"typescript": "^3.9.7"
}
}

View File

@ -15,6 +15,8 @@ module.exports = {
'@typescript-eslint/indent': ['error', 2],
'@typescript-eslint/member-delimiter-style': ['error', { multiline: { delimiter: 'none' } }],
'@typescript-eslint/type-annotation-spacing': ['error', {}],
// off
'@typescript-eslint/camelcase': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/explicit-member-accessibility': 'off',

View File

@ -6,9 +6,6 @@
"keywords": [],
"author": "Anthony Fu <anthonyfu117@hotmail.com> (https://github.com/antfu/)",
"license": "MIT",
"scripts": {
"lint": "eslint . --config=index.js"
},
"files": [
"index.js"
],
@ -20,13 +17,8 @@
"typescript": ">=3.9"
},
"dependencies": {
"@antfu/eslint-config": "^0.2.14",
"@antfu/eslint-config-basic": "workspace:*",
"@typescript-eslint/eslint-plugin": "3.6.1",
"@typescript-eslint/parser": "^3.6.1"
},
"devDependencies": {
"eslint": "^7.0.0",
"typescript": "^3.7.1-rc"
},
"gitHead": "bd0460759c73f7fcdf32570f40a13e37ab6961c0"
"@typescript-eslint/parser": "^3.9.0"
}
}

View File

@ -4,13 +4,13 @@ module.exports = {
parser: '@typescript-eslint/parser',
},
extends: [
'plugin:vue/recommended',
'plugin:vue/vue3-recommended',
'@antfu/eslint-config-ts',
],
plugins: [
'vue'
'vue',
],
rules: {
'vue/max-attributes-per-line': ['warn', { singleline: 5 }],
}
},
}

View File

@ -6,9 +6,6 @@
"keywords": [],
"author": "Anthony Fu <anthonyfu117@hotmail.com> (https://github.com/antfu/)",
"license": "MIT",
"scripts": {
"lint": "eslint . --config=index.js"
},
"files": [
"index.js"
],
@ -19,12 +16,7 @@
"access": "public"
},
"dependencies": {
"@antfu/eslint-config-ts": "^0.2.14",
"@antfu/eslint-config-ts": "workspace:*",
"eslint-plugin-vue": "7.0.0-alpha.10"
},
"devDependencies": {
"eslint": "^7.0.0",
"typescript": "^3.9.7"
},
"gitHead": "bd0460759c73f7fcdf32570f40a13e37ab6961c0"
}
}

File diff suppressed because it is too large Load Diff

View File

@ -1,2 +1,2 @@
packages
- 'packages/**'
packages:
- 'packages/*'