Skip to content

Commit

Permalink
add eslint with prettier, fix linting issues, add husky and start tra…
Browse files Browse the repository at this point in the history
…vis ci
  • Loading branch information
Jefftopia committed Mar 29, 2020
1 parent 915cc06 commit dc0366f
Show file tree
Hide file tree
Showing 14 changed files with 634 additions and 306 deletions.
6 changes: 6 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
dist
doc
scripts
reports
node_modules
example
18 changes: 16 additions & 2 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,27 @@ module.exports = {
"prettier/@typescript-eslint", // Uses eslint-config-prettier to disable ESLint rules from @typescript-eslint/eslint-plugin that would conflict with prettier
"plugin:prettier/recommended" // Enables eslint-plugin-prettier and eslint-config-prettier. This will display prettier errors as ESLint errors. Make sure this is always the last configuration in the extends array.
],
settings: {
'import/parsers': {
'@typescript-eslint/parser': ['.ts']
},
'import/resolver': {
typescript: {}
}
},
plugins: ['@typescript-eslint', 'prettier'],
env: {
node: true
},
parserOptions: {
ecmaVersion: 2018, // Allows for the parsing of modern ECMAScript features
sourceType: "module" // Allows for the use of imports
sourceType: "module", // Allows for the use of imports
project: './tsconfig.json',
tsconfigRootDir: __dirname
},
rules: {
"@typescript-eslint/no-empty-interface": "off"
// Place to specify ESLint rules. Can be used to overwrite rules specified from the extended configs
// e.g. "@typescript-eslint/explicit-function-return-type": "off",
}
};

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@ builld
.vscode
.code
.env
report

example/node_modules
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v10.13.0
17 changes: 17 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
language: node_js
install:
- "npm install"
- "npm run lint"
- "npm run build"
# - "npm run test"

node_js:
- "12"
- "10"

notifications:
email:
recipients:
- jsmith6690gmail.com
on_success: never
on_failure: always
3 changes: 0 additions & 3 deletions example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,6 @@
"launch": "npm start -- --launch"
},
"jest": {
"transform": {
"^.+\\.tsx?$": "ts-jest"
},
"testURL": "http://localhost/",
"testRegex": "(/__tests__/.*|(\\.|/)(test|spec))\\.(jsx?|tsx?)$",
"testPathIgnorePatterns": [
Expand Down
Loading

0 comments on commit dc0366f

Please sign in to comment.