summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsyuilo <Syuilotan@yahoo.co.jp>2021-03-13 00:18:41 +0900
committersyuilo <Syuilotan@yahoo.co.jp>2021-03-13 00:18:41 +0900
commit320f5fedfb0fe0c6761ba0ba5a4d37b730975f41 (patch)
tree9f5e9b7c081b2d976bb2dd348d74dcfc6c606d4f
parentnpm run watchでサーバーサイドもwatchするように (diff)
downloadsharkey-320f5fedfb0fe0c6761ba0ba5a4d37b730975f41.tar.gz
sharkey-320f5fedfb0fe0c6761ba0ba5a4d37b730975f41.tar.bz2
sharkey-320f5fedfb0fe0c6761ba0ba5a4d37b730975f41.zip
eslintrcとtsconfigを整理
-rw-r--r--.eslintrc20
-rw-r--r--gulpfile.ts2
-rw-r--r--src/.eslintrc6
-rw-r--r--src/client/.eslintrc20
-rw-r--r--src/tsconfig.json (renamed from tsconfig.json)8
-rw-r--r--test/.eslintrc7
-rw-r--r--test/tsconfig.json36
7 files changed, 75 insertions, 24 deletions
diff --git a/.eslintrc b/.eslintrc
index 3a220319e5..3e5b59cb04 100644
--- a/.eslintrc
+++ b/.eslintrc
@@ -3,29 +3,11 @@
"parser": "@typescript-eslint/parser"
},
"extends": [
- "eslint:recommended",
- "plugin:vue/recommended"
+ "eslint:recommended"
],
"rules": {
- "vue/require-v-for-key": 0,
- "vue/max-attributes-per-line": 0,
- "vue/html-indent": 0,
- "vue/html-self-closing": 0,
- "vue/no-unused-vars": 0,
- "vue/attributes-order": 0,
- "vue/require-prop-types": 0,
- "vue/require-default-prop": 0,
- "vue/html-closing-bracket-spacing": 0,
- "vue/singleline-html-element-content-newline": 0,
- "vue/no-v-html": 0,
"no-console": 0,
"no-unused-vars": 0,
"no-empty": 0
- },
- "globals": {
- "ENV": true,
- "VERSION": true,
- "API": true,
- "LANGS": true
}
}
diff --git a/gulpfile.ts b/gulpfile.ts
index b899d62f99..0717d82086 100644
--- a/gulpfile.ts
+++ b/gulpfile.ts
@@ -14,7 +14,7 @@ const locales: { [x: string]: any } = require('./locales');
const meta = require('./package.json');
gulp.task('build:ts', () => {
- const tsProject = ts.createProject('./tsconfig.json');
+ const tsProject = ts.createProject('./src/tsconfig.json');
return tsProject
.src()
diff --git a/src/.eslintrc b/src/.eslintrc
new file mode 100644
index 0000000000..d54e20f6b6
--- /dev/null
+++ b/src/.eslintrc
@@ -0,0 +1,6 @@
+{
+ "env": {
+ "node": true,
+ "commonjs": true
+ }
+}
diff --git a/src/client/.eslintrc b/src/client/.eslintrc
index 8829472b49..fffa28d9e4 100644
--- a/src/client/.eslintrc
+++ b/src/client/.eslintrc
@@ -1,4 +1,24 @@
{
+ "env": {
+ "node": false,
+ },
+ "extends": [
+ "eslint:recommended",
+ "plugin:vue/recommended"
+ ],
+ "rules": {
+ "vue/require-v-for-key": 0,
+ "vue/max-attributes-per-line": 0,
+ "vue/html-indent": 0,
+ "vue/html-self-closing": 0,
+ "vue/no-unused-vars": 0,
+ "vue/attributes-order": 0,
+ "vue/require-prop-types": 0,
+ "vue/require-default-prop": 0,
+ "vue/html-closing-bracket-spacing": 0,
+ "vue/singleline-html-element-content-newline": 0,
+ "vue/no-v-html": 0
+ },
"globals": {
"_DEV_": false,
"_LANGS_": false,
diff --git a/tsconfig.json b/src/tsconfig.json
index 075450bf64..95cb35fc5f 100644
--- a/tsconfig.json
+++ b/src/tsconfig.json
@@ -22,8 +22,8 @@
"resolveJsonModule": true,
"isolatedModules": true,
"typeRoots": [
- "node_modules/@types",
- "src/@types"
+ "../node_modules/@types",
+ "./@types"
],
"lib": [
"esnext"
@@ -31,9 +31,9 @@
},
"compileOnSave": false,
"include": [
- "./src/**/*.ts"
+ "./**/*.ts"
],
"exclude": [
- "./src/client/**/*.ts"
+ "./client/**/*.ts"
]
}
diff --git a/test/.eslintrc b/test/.eslintrc
new file mode 100644
index 0000000000..cea1b11388
--- /dev/null
+++ b/test/.eslintrc
@@ -0,0 +1,7 @@
+{
+ "env": {
+ "node": true,
+ "mocha": true,
+ "commonjs": true
+ }
+}
diff --git a/test/tsconfig.json b/test/tsconfig.json
new file mode 100644
index 0000000000..987067ba81
--- /dev/null
+++ b/test/tsconfig.json
@@ -0,0 +1,36 @@
+{
+ "compilerOptions": {
+ "allowJs": true,
+ "noEmitOnError": false,
+ "noImplicitAny": true,
+ "noImplicitReturns": true,
+ "noUnusedParameters": false,
+ "noUnusedLocals": true,
+ "noFallthroughCasesInSwitch": true,
+ "declaration": false,
+ "sourceMap": true,
+ "target": "es2017",
+ "module": "commonjs",
+ "moduleResolution": "node",
+ "removeComments": false,
+ "noLib": false,
+ "strict": true,
+ "strictNullChecks": true,
+ "strictPropertyInitialization": false,
+ "experimentalDecorators": true,
+ "emitDecoratorMetadata": true,
+ "resolveJsonModule": true,
+ "isolatedModules": true,
+ "typeRoots": [
+ "../node_modules/@types",
+ "../src/@types"
+ ],
+ "lib": [
+ "esnext"
+ ]
+ },
+ "compileOnSave": false,
+ "include": [
+ "./**/*.ts"
+ ]
+}