Skip to content

Commit

Permalink
test: replace formatting rules with prettier config
Browse files Browse the repository at this point in the history
  • Loading branch information
LucasDemea committed Feb 6, 2023
1 parent 260c298 commit 3064842
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 25 deletions.
46 changes: 21 additions & 25 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -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'],
};
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
/yarn-error.log
!.eslintrc.json
!.eslintrc.cjs
!.prettierrc
!.eslintrc.test.json
!.husky
!.travis.yml
Expand Down
6 changes: 6 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"trailingComma": "es5",
"tabWidth": 2,
"semi": true,
"singleQuote": true
}

0 comments on commit 3064842

Please sign in to comment.