Skip to content

Commit

Permalink
chore: add test environment
Browse files Browse the repository at this point in the history
  • Loading branch information
changchanghwang committed Jan 24, 2024
1 parent bd2225e commit 31877d8
Show file tree
Hide file tree
Showing 5 changed files with 2,736 additions and 5,092 deletions.
76 changes: 36 additions & 40 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,58 +1,54 @@
module.exports = {
parser: "@typescript-eslint/parser",
parser: '@typescript-eslint/parser',
parserOptions: {
project: "tsconfig.json",
project: 'tsconfig.json',
tsconfigRootDir: __dirname,
sourceType: "module",
sourceType: 'module',
},
plugins: ["@typescript-eslint/eslint-plugin"],
plugins: ['@typescript-eslint/eslint-plugin'],
extends: [
"airbnb-base",
"plugin:@typescript-eslint/recommended",
"plugin:prettier/recommended",
"plugin:import/typescript",
'airbnb-base',
'plugin:@typescript-eslint/recommended',
'plugin:prettier/recommended',
'plugin:import/typescript',
],
root: true,
env: {
node: true,
jest: true,
},
ignorePatterns: [".eslintrc.js"],
ignorePatterns: ['.eslintrc.js'],
rules: {
"@typescript-eslint/interface-name-prefix": "off",
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/ban-ts-comment": "off",
"import/extensions": "off",
"import/no-unresolved": "off",
"import/prefer-default-export": "off",
"no-useless-constructor": "off",
"max-classes-per-file": "off",
"no-shadow": "off",
"prettier/prettier": "error",
"no-param-reassign": "off",
"import/no-extraneous-dependencies": [
"error",
{ devDependencies: ["**/*.spec.*", "**/*.test.*"] },
],
"no-use-before-define": "off",
"@typescript-eslint/no-use-before-define": [
"error",
'@typescript-eslint/interface-name-prefix': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/ban-ts-comment': 'off',
'import/extensions': 'off',
'import/no-unresolved': 'off',
'import/prefer-default-export': 'off',
'no-useless-constructor': 'off',
'max-classes-per-file': 'off',
'no-shadow': 'off',
'prettier/prettier': 'error',
'no-param-reassign': 'off',
'import/no-extraneous-dependencies': ['error', { devDependencies: ['**/*.spec.*', '**/*.test.*'] }],
'no-use-before-define': 'off',
'@typescript-eslint/no-use-before-define': [
'error',
{ typedefs: false, functions: false, classes: false, variables: true },
],
"@typescript-eslint/no-non-null-assertion": "off",
"no-restricted-syntax": ["error", "WithStatement"],
"class-methods-use-this": "off",
"import/no-extraneous-dependencies": [
"error",
{ devDependencies: ["**/*.test.ts", "**/*.spec.ts", "**/*.e2e-test.ts"] },
'@typescript-eslint/no-non-null-assertion': 'off',
'no-restricted-syntax': ['error', 'WithStatement'],
'class-methods-use-this': 'off',
'import/no-extraneous-dependencies': [
'error',
{ devDependencies: ['**/*.test.ts', '**/*.spec.ts', '**/*.e2e-test.ts'] },
],
"@typescript-eslint/no-unused-vars": [
"warn",
'@typescript-eslint/no-unused-vars': [
'warn',
{
varsIgnorePattern: "^_",
argsIgnorePattern: "^_",
varsIgnorePattern: '^_',
argsIgnorePattern: '^_',
},
],
},
Expand Down
3 changes: 3 additions & 0 deletions .vscode-test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
const { defineConfig } = require('@vscode/test-cli');

module.exports = defineConfig({ files: 'dist/test/**/*.test.js' });
Loading

0 comments on commit 31877d8

Please sign in to comment.