Yuki Takei 5 лет назад
Родитель
Сommit
b29d9673f4

+ 31 - 0
packages/slack/.eslintrc.js

@@ -0,0 +1,31 @@
+module.exports = {
+  parser: '@typescript-eslint/parser',
+  extends: [
+    'weseek',
+    'weseek/typescript',
+    'plugin:jest/recommended',
+  ],
+  env: {
+    jquery: true,
+    'jest/globals': true,
+  },
+  globals: {
+  },
+  plugins: [
+    'jest',
+  ],
+  rules: {
+    'import/prefer-default-export': 'off',
+    '@typescript-eslint/no-explicit-any': 'off',
+    indent: [
+      'error',
+      2,
+      {
+        SwitchCase: 1,
+        ArrayExpression: 'first',
+        FunctionDeclaration: { body: 1, parameters: 2 },
+        FunctionExpression: { body: 1, parameters: 2 },
+      },
+    ],
+  },
+};

+ 2 - 0
packages/slack/.gitignore

@@ -0,0 +1,2 @@
+/dist/
+/data/sqlite.db

+ 34 - 0
packages/slack/package.json

@@ -0,0 +1,34 @@
+{
+  "name": "@growi/slack",
+  "version": "0.9.0-RC",
+  "license": "MIT",
+  "scripts": {
+    "build": "yarn tsc",
+    "tsc": "tsc -p tsconfig.build.json && tsc-alias -p tsconfig.build.json",
+    "tsc:w": "tsc -w",
+    "test": "yarn test:lint && yarn test:coverage",
+    "test:unit": "cross-env NODE_ENV=test jest --passWithNoTests",
+    "test:coverage": "yarn test:unit",
+    "test:lint": "eslint src --ext .ts",
+    "test:lint:fix": "eslint src --ext .ts --fix"
+  },
+  "dependencies": {
+    "dotenv-flow": "^3.2.0"
+  },
+  "devDependencies": {
+    "@tsed/core": "^6.34.3",
+    "@tsed/exceptions": "^6.34.3",
+    "@tsed/json-mapper": "^6.34.3",
+    "@tsed/schema": "^6.34.3",
+    "@typescript-eslint/eslint-plugin": "^4.18.0",
+    "@typescript-eslint/parser": "^4.18.0",
+    "eslint-import-resolver-typescript": "^2.4.0",
+    "sqlite3": "^5.0.2",
+    "ts-jest": "^26.5.4",
+    "ts-node": "^9.1.1",
+    "ts-node-dev": "^1.1.6",
+    "tsconfig-paths": "^3.9.0",
+    "tsc-alias": "1.2.6",
+    "typescript": "^4.2.3"
+  }
+}

+ 12 - 0
packages/slack/tsconfig.build.json

@@ -0,0 +1,12 @@
+{
+  "extends": "./tsconfig.json",
+  "compilerOptions": {
+    "outDir": "dist",
+    "declaration": true,
+    "noResolve": false,
+    "preserveConstEnums": true,
+    "sourceMap": true,
+    "noEmit": false,
+    "inlineSources": true
+  }
+}

+ 46 - 0
packages/slack/tsconfig.json

@@ -0,0 +1,46 @@
+{
+  "compilerOptions": {
+    "target": "es2019",
+    "module": "commonjs",
+    "lib": ["dom", "dom.iterable", "esnext"],
+    "sourceMap": true,
+    "noEmit": true,
+    "removeComments": false,
+    "importHelpers": true,
+    "isolatedModules": true,
+
+    /* Strict Type-Checking Options */
+    // "strict": true,
+    "strictNullChecks": true,
+    "noImplicitAny": false,
+
+    /* Additional Checks */
+    "noUnusedLocals": false,
+    "noUnusedParameters": false,
+
+    /* Module Resolution Options */
+    "moduleResolution": "node",
+    "baseUrl": ".",
+    "paths": {
+      "~/*": ["src/*"],
+      "^/*": ["./*"],
+    },
+    "typeRoots": [
+      "../../node_modules/@types",
+      "./node_modules/@types"
+    ],
+    "allowSyntheticDefaultImports": true,
+    "esModuleInterop": true,
+
+    /* Misc */
+    "preserveConstEnums": true,
+    "forceConsistentCasingInFileNames": true,
+    "resolveJsonModule": true,
+
+    /* Experimental Options */
+    "experimentalDecorators": true,
+    "emitDecoratorMetadata": true
+  },
+  "exclude": ["node_modules", "./public", "dist", "test"],
+  "include": ["./src/**/*.ts"]
+}