Skip to content

Commit

Permalink
Replace jshint with eslint, fix formatting issues and bugs found in t…
Browse files Browse the repository at this point in the history
…he process
  • Loading branch information
frederickf committed Oct 7, 2019
1 parent d5dd566 commit ba5e2a5
Show file tree
Hide file tree
Showing 9 changed files with 558 additions and 14 deletions.
22 changes: 22 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
module.exports = {
'env': {
'node': true,
'es6': true
},
'extends': 'eslint:recommended',
'globals': {
'Atomics': 'readonly',
'SharedArrayBuffer': 'readonly'
},
'parserOptions': {
'ecmaVersion': 2018,
'sourceType': 'module'
},
'rules': {
'brace-style': ['error', 'stroustrup'],
'indent': ['error', 2, {"SwitchCase": 1}],
'linebreak-style': ['error', 'unix'],
'quotes': ['error', 'single'],
'semi': ['error', 'never']
}
}
5 changes: 0 additions & 5 deletions .jshintrc

This file was deleted.

7 changes: 7 additions & 0 deletions __tests__/dist/bundle.cjs.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,13 @@ test('should throw unmatched close parenthesis error ', () => {
.toThrowError(new Error('Invalid token ")" at position 12'))
})

test('should throw invalid close parenthesis error ', () => {
expect(
() => {bqpjs('A AND )')}
)
.toThrowError(new Error('Invalid token ")" at position 6'))
})

test('should throw unmatched open quote error', () => {
expect(
() => {bqpjs('A AND "B OR C')}
Expand Down
Loading

0 comments on commit ba5e2a5

Please sign in to comment.