diff --git a/.eslintrc.cjs b/.eslintrc.cjs index 302348b..a759c6d 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -1,28 +1,24 @@ -const tsConfig = require("./tsconfig.json"); +const tsConfig = require('./tsconfig.json'); // const tsTestConfig = require('./tsconfig.test.json'); module.exports = { - parserOptions: { - ecmaVersion: 2018, - sourceType: "module", - }, - rules: { - semi: 2, - indent: ["error", 2], - }, - overrides: [ - { - extends: [ - "eslint:recommended", - "plugin:@typescript-eslint/recommended", - "plugin:@typescript-eslint/recommended-requiring-type-checking", - ], - files: tsConfig.include, - parser: "@typescript-eslint/parser", - parserOptions: { - project: ["./tsconfig.json"], // Specify it only for TypeScript files - }, - plugins: ["@typescript-eslint/eslint-plugin", "eslint-plugin-tsdoc"], - }, - ], - ignorePatterns: ["sample", "**/node_modules/*.[tj]s", "**/dist/**/*.[tj]s"], + parserOptions: { + ecmaVersion: 2018, + sourceType: 'module', + }, + overrides: [ + { + extends: [ + 'eslint:recommended', + 'plugin:@typescript-eslint/recommended', + 'plugin:@typescript-eslint/recommended-requiring-type-checking', + ], + files: tsConfig.include, + parser: '@typescript-eslint/parser', + parserOptions: { + project: ['./tsconfig.json'], + }, + plugins: ['@typescript-eslint/eslint-plugin', 'eslint-plugin-tsdoc'], + }, + ], + ignorePatterns: ['sample', '**/node_modules/*.[tj]s', '**/dist/**/*.[tj]s'], }; diff --git a/.gitignore b/.gitignore index c11ed77..17930ac 100644 --- a/.gitignore +++ b/.gitignore @@ -5,6 +5,7 @@ /yarn-error.log !.eslintrc.json !.eslintrc.cjs +!.prettierrc !.eslintrc.test.json !.husky !.travis.yml diff --git a/.prettierrc b/.prettierrc new file mode 100755 index 0000000..1dc7164 --- /dev/null +++ b/.prettierrc @@ -0,0 +1,6 @@ +{ + "trailingComma": "es5", + "tabWidth": 2, + "semi": true, + "singleQuote": true +} \ No newline at end of file