Skip to content

Commit

Permalink
Make linting stricter and add dependabot
Browse files Browse the repository at this point in the history
  • Loading branch information
ferferga committed Dec 31, 2020
1 parent c1589ab commit 6c12852
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 29 deletions.
59 changes: 30 additions & 29 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,40 +1,36 @@
module.exports = {
root: true,
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint'],
plugins: ['@typescript-eslint', 'prettier', 'promise', 'import', 'jsdoc'],
env: {
node: true,
es6: true
},
extends: [
'eslint:recommended',
'prettier',
'plugin:prettier/recommended',
'plugin:promise/recommended',
'plugin:@typescript-eslint/recommended',
'prettier'
'plugin:jsdoc/recommended',
'plugin:import/errors',
'plugin:import/warnings',
'plugin:import/typescript'
],
parserOptions: {
ecmaVersion: 2020,
sourceType: 'module'
},
rules: {
'block-spacing': ['error'],
'brace-style': ['error'],
'comma-dangle': ['error', 'never'],
'comma-spacing': ['error'],
'eol-last': ['error'],
indent: ['error', 4, { SwitchCase: 1 }],
'keyword-spacing': ['error'],
'max-statements-per-line': ['error'],
'no-floating-decimal': ['error'],
'no-multi-spaces': ['error'],
'no-multiple-empty-lines': ['error', { max: 1 }],
'no-trailing-spaces': ['error'],
'one-var': ['error', 'never'],
semi: ['error'],
'space-before-blocks': ['error']
'@typescript-eslint/explicit-function-return-type': 'error',
'@typescript-eslint/no-explicit-any': 'warn',
'import/newline-after-import': 'error',
'import/order': 'error',
'promise/no-nesting': 'error',
'promise/no-new-statics': 'error',
'promise/no-return-in-finally': 'error',
'promise/prefer-await-to-callbacks': 'error',
'promise/prefer-await-to-then': 'error',
'prefer-arrow-callback': 'error'
},
overrides: [
{
files: ['./src/**/*.js', './src/**/*.ts'],
files: ['.js', '.ts'],
env: {
node: false,
browser: true,
Expand All @@ -44,12 +40,17 @@ module.exports = {
cast: 'readonly',
PRODUCTION: 'readonly',
$scope: 'writable'
},
rules: {
// Disable these until we have converted the project to TS
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-explicit-any': 'off'
}
}
]
],
settings: {
'import/parsers': {
'@typescript-eslint/parser': ['.ts', '.tsx']
},
'import/resolver': {
typescript: {
alwaysTryTypes: true
}
}
}
};
17 changes: 17 additions & 0 deletions .github/.dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
version: 2
updates:
# Fetch and update latest `npm` packages
- package-ecosystem: npm
directory: '/'
schedule:
interval: daily
time: '00:00'
open-pull-requests-limit: 10
reviewers:
- YouKnowBlom
assignees:
- YouKnowBlom
commit-message:
prefix: fix
prefix-development: chore
include: scope

0 comments on commit 6c12852

Please sign in to comment.