Skip to content

Commit

Permalink
refactor: added eslint and prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
peterknezek committed Dec 5, 2021
1 parent 5e9d699 commit dfa6bb4
Show file tree
Hide file tree
Showing 28 changed files with 18,959 additions and 389 deletions.
33 changes: 33 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"env": {
"es2021": true,
"node": true,
"jest": true
},
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking",
"plugin:prettier/recommended",
"prettier"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": ["./tsconfig.json"]
},
"ignorePatterns": "*.test.ts",
"plugins": [
"@typescript-eslint",
"simple-import-sort",
"eslint-plugin-import"
],
"rules": {
"prettier/prettier": "warn",
"import/no-deprecated": "warn",
"import/no-extraneous-dependencies": "error",
"import/no-unassigned-import": "warn",
"simple-import-sort/imports": "error",
"simple-import-sort/exports": "error",
"prefer-const": "warn"
}
}
5 changes: 4 additions & 1 deletion .github/workflows/integrate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,11 @@ jobs:
- name: Install Dependencies
run: npm ci

- name: Lint
run: npm run lint

- name: Test
run: npm run test:ci

- name: Test build
run: npm run build
run: npm run build
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@
/yarn.lock
node_modules
/.DS_Store
/coverage
8 changes: 8 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
module.exports = {
semi: true,
trailingComma: 'all',
singleQuote: true,
printWidth: 120,
tabWidth: 2,
};

2 changes: 1 addition & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ module.exports = {
testMatch: ['<rootDir>/tests/**/*.ts', '<rootDir>/src/**/*.test.ts'],
transform: {'\\.ts$': 'ts-jest'},
coverageReporters: ['lcov', 'text-summary'],
// collectCoverage: !!`Boolean(process.env.CI)`,
collectCoverage: false, // !!`Boolean(process.env.CI)`,
collectCoverageFrom: ['src/**/*.ts'],
coveragePathIgnorePatterns: ['/templates/'],
coverageThreshold: {
Expand Down
Loading

0 comments on commit dfa6bb4

Please sign in to comment.