Skip to content

Commit

Permalink
Merge pull request #1 from query-easy/1.0.0-dev
Browse files Browse the repository at this point in the history
typescript migration, api refactoring
  • Loading branch information
akash-kansara committed Mar 27, 2021
2 parents 546c2f7 + a8543b5 commit bcc906c
Show file tree
Hide file tree
Showing 95 changed files with 1,941 additions and 3,004 deletions.
141 changes: 119 additions & 22 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,26 +1,123 @@
module.exports = {
'env': {
'node': true,
'commonjs': true,
'es6': true,
'mocha': true
root: true,
parser: '@typescript-eslint/parser',
plugins: ['eslint-plugin', '@typescript-eslint', 'mocha'],
env: {
es6: true,
node: true,
mocha: true,
},
'extends': ['eslint:recommended'],
'globals': {
'Atomics': 'readonly',
'SharedArrayBuffer': 'readonly'
parserOptions: {
project: './tsconfig.json',
},
'parserOptions': {
'ecmaVersion': 2018
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'prettier',
],
rules: {
'prefer-const': 'error',
'no-mixed-operators': 'off',
'no-console': 'error',
'no-inner-declarations': 'off',
'no-dupe-class-members': 'off',

'@typescript-eslint/prefer-for-of': 'error',
'@typescript-eslint/no-explicit-any': 'off',

'no-new-wrappers': 'error',

'@typescript-eslint/no-misused-new': 'error',
'@typescript-eslint/explicit-module-boundary-types': 'off',

'no-shadow': 'off',
'@typescript-eslint/no-shadow': 'error',

'@typescript-eslint/no-unused-vars': [
'error',
{
vars: 'all',
args: 'none',
ignoreRestSiblings: false,
},
],
'no-var': 'error',

'@typescript-eslint/prefer-optional-chain': 'error',
'@typescript-eslint/prefer-nullish-coalescing': 'error',
'@typescript-eslint/no-extra-non-null-assertion': 'error',

camelcase: 'off',
'@typescript-eslint/naming-convention': [
'error',
{
selector: 'default',
format: ['camelCase'],
},

{
selector: 'variable',
format: ['camelCase', 'UPPER_CASE', 'PascalCase'],
},

{
selector: 'variable',
format: null,
filter: {
regex: '^_$',
match: true,
},
},

{
selector: 'parameter',
format: ['camelCase'],
leadingUnderscore: 'allow',
},

{
selector: 'enumMember',
format: ['camelCase', 'UPPER_CASE', 'PascalCase'],
leadingUnderscore: 'allow',
},

{
selector: 'property',
format: ['camelCase', 'UPPER_CASE', 'PascalCase'],
leadingUnderscore: 'allow',
},

{
selector: 'method',
format: ['camelCase'],
leadingUnderscore: 'allow',
},

{
selector: 'memberLike',
modifiers: ['static'],
format: ['camelCase', 'UPPER_CASE'],
},

{
selector: 'memberLike',
modifiers: ['private'],
format: ['camelCase'],
leadingUnderscore: 'allow',
},

{
selector: 'memberLike',
modifiers: ['protected'],
format: ['camelCase'],
leadingUnderscore: 'allow',
},

{
selector: 'typeLike',
format: ['PascalCase'],
},
],
},
'rules': {
'indent': ['error', 2, { 'SwitchCase': 1 }],
'linebreak-style': ['error', 'unix'],
'quotes': ['error', 'single'],
'semi': ['error', 'always'],
'comma-dangle': ['error', 'never'],
'no-console': 2,
'semi-style': ['error', 'last'],
'semi-spacing': ['error', { before: false, after: true }]
}
};

};
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ yarn.lock
package-lock.json
node_modules
npm-debug.log
dist/
coverage/

# workspace
.DS_Store
Expand All @@ -11,4 +13,4 @@ npm-debug.log
*.sublime-workspace

# code coverage
.nyc_output
.nyc_output
7 changes: 7 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"bracketSpacing": false,
"singleQuote": true,
"printWidth": 80,
"trailingComma": "all",
"arrowParens": "avoid"
}
7 changes: 4 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
language: node_js
services:
- mongodb
node_js:
- 10
after_success: npm run coverage
before_script:
- npm run build
after_success:
- npm run coveralls

0 comments on commit bcc906c

Please sign in to comment.