Skip to content

Commit

Permalink
Add linting (#6)
Browse files Browse the repository at this point in the history
* setup project for linting and add to ci

* ci fix

* trigger fix
  • Loading branch information
marchinram authored Jun 30, 2020
1 parent 317dd81 commit 37d55e6
Show file tree
Hide file tree
Showing 9 changed files with 1,264 additions and 170 deletions.
46 changes: 28 additions & 18 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,30 @@
version: 2
defaults: &defaults
working_directory: ~/repo
docker:
- image: circleci/node:12.2
jobs:
dummy:
version: 2.1
references:
defaults: &defaults
docker:
- image: cimg/base:2020.01
- image: circleci/node:12.2
tag_filter: &tag_filter
filters:
branches:
ignore: /.*/
tags:
only: /^v\d+\.\d+\.\d+$/
jobs:
lint:
<<: *defaults
steps:
- run:
name: Running dummy job
command: echo ''
- checkout
- run: npm install
- run: npm run lint
- persist_to_workspace:
root: .
paths:
- .
deploy:
<<: *defaults
steps:
- checkout
- attach_workspace:
at: .
- run:
name: Authenticate with registry
command: echo "//registry.npmjs.org/:_authToken=$npm_TOKEN" > ~/repo/.npmrc
Expand All @@ -31,12 +41,12 @@ workflows:
version: 2
untagged-build:
jobs:
- dummy
- lint
tagged-build:
jobs:
- lint:
<<: *tag_filter
- deploy:
filters:
branches:
ignore: /.*/
tags:
only: /^v\d+\.\d+\.\d+$/
requires:
- lint
<<: *tag_filter
10 changes: 10 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"env": {
"node": true
},
"extends": ["eslint:recommended", "plugin:prettier/recommended"],
"parser": "babel-eslint",
"rules": {
"no-console": "warn"
}
}
4 changes: 4 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
module.exports = {
singleQuote: true,
semi: false,
}
145 changes: 0 additions & 145 deletions index.d.ts

This file was deleted.

5 changes: 0 additions & 5 deletions index.js

This file was deleted.

Loading

0 comments on commit 37d55e6

Please sign in to comment.