Skip to content

Commit

Permalink
Merge pull request #514 from jakubroztocil/tslint-to-eslint
Browse files Browse the repository at this point in the history
Migrate from tslint to eslint/prettier
  • Loading branch information
davidgoli committed Jun 8, 2022
2 parents 67df74b + ecddb8c commit 218cc58
Show file tree
Hide file tree
Showing 54 changed files with 4,355 additions and 2,678 deletions.
128 changes: 128 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
module.exports = {
env: {
browser: true,
node: true,
},
extends: [
'prettier',
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
],
parser: '@typescript-eslint/parser',
parserOptions: {
project: 'tsconfig.json',
sourceType: 'module',
},
plugins: [
'eslint-plugin-import',
'eslint-plugin-jsdoc',
'@typescript-eslint',
],
root: true,
rules: {
'@typescript-eslint/await-thenable': 'error',
'@typescript-eslint/consistent-type-assertions': 'error',
'@typescript-eslint/member-delimiter-style': [
'error',
{
multiline: {
delimiter: 'none',
requireLast: true,
},
singleline: {
delimiter: 'semi',
requireLast: false,
},
},
],
'@typescript-eslint/naming-convention': 'error',
'@typescript-eslint/no-empty-function': 'error',
'@typescript-eslint/no-floating-promises': 'error',
'@typescript-eslint/no-misused-new': 'error',
'@typescript-eslint/no-unnecessary-qualifier': 'error',
'@typescript-eslint/no-unnecessary-type-assertion': 'error',
'@typescript-eslint/no-unused-expressions': [
'error',
{
allowTaggedTemplates: true,
allowShortCircuit: true,
},
],
'@typescript-eslint/prefer-namespace-keyword': 'error',
'@typescript-eslint/quotes': [
'error',
'single',
{
avoidEscape: true,
},
],
'@typescript-eslint/semi': ['error', 'never'],
'@typescript-eslint/triple-slash-reference': [
'error',
{
path: 'always',
types: 'prefer-import',
lib: 'always',
},
],
'@typescript-eslint/type-annotation-spacing': 'error',
'@typescript-eslint/unified-signatures': 'error',
'brace-style': ['error', '1tbs'],
'comma-dangle': 'error',
curly: ['error', 'multi-line'],
'eol-last': 'error',
eqeqeq: ['error', 'smart'],
'id-denylist': [
'error',
'any',
'Number',
'number',
'String',
'string',
'Boolean',
'boolean',
'Undefined',
'undefined',
],
'id-match': 'error',
'import/no-deprecated': 'error',
'jsdoc/check-alignment': 'error',
'jsdoc/check-indentation': 'error',
'jsdoc/newline-after-description': 'error',
'new-parens': 'error',
'no-caller': 'error',
'no-cond-assign': 'error',
'no-constant-condition': 'error',
'no-control-regex': 'error',
'no-duplicate-imports': 'error',
'no-empty': 'error',
'no-empty-function': 'error',
'no-eval': 'error',
'no-fallthrough': 'error',
'no-invalid-regexp': 'error',
'no-multiple-empty-lines': 'error',
'no-redeclare': 'error',
'no-regex-spaces': 'error',
'no-return-await': 'error',
'no-throw-literal': 'error',
'no-trailing-spaces': 'error',
'no-underscore-dangle': 'error',
'no-unused-expressions': 'error',
'no-unused-labels': 'error',
'no-var': 'error',
'one-var': ['error', 'never'],
quotes: 'error',
radix: 'error',
semi: 'error',
'space-before-function-paren': ['error', 'always'],
'space-in-parens': ['error', 'never'],
'spaced-comment': [
'error',
'always',
{
markers: ['/'],
},
],
'use-isnan': 'error',
},
}
6 changes: 3 additions & 3 deletions .github/issue_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ Thank you for taking an interest in `rrule`! Please include the following in
your report:

- [ ] Verify that you've looked through existing issues for duplicates before
creating a new one
creating a new one
- [ ] Code sample reproducing the issue. Be sure to include all input values you
are using such as the exact RRule string and dates.
are using such as the exact RRule string and dates.
- [ ] Expected output
- [ ] Actual output
- [ ] The version of `rrule` you are using
- [ ] Your operating system
- [ ] Your local timezone (run `$ date` from the command line
of the machine showing the bug)
of the machine showing the bug)
1 change: 1 addition & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
. "$(dirname -- "$0")/_/husky.sh"

yarn lint
yarn format
8 changes: 8 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
node_modules/
bower_components/
.idea
.vscode
*.log
coverage
.nyc_output
dist/
6 changes: 6 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"semi": false,
"tabWidth": 2,
"useTabs": false,
"singleQuote": true
}
7 changes: 5 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,25 @@
### Changelog

- 2.7.0 (2022-06-05)

- Features:
- **BREAKING CHANGE** Removes default export in favor of named exports
- Removes Luxon dependency

- 2.6.8 (2021-02-04)

- Bugfixes:
- Solve circular imports (#444)

- 2.6.6 (2020-08-23)

- Bugfixes:
- Fixed broken npm package (#417)

- 2.6.5 (2020-08-23)
- Bugfixes:
- `luxon`-less binary should not contain any `luxon` imports (#410)
- Fixed `toText` pluralization of “minutes“ (#415)
- `luxon`-less binary should not contain any `luxon` imports (#410)
- Fixed `toText` pluralization of “minutes“ (#415)
- 2.6.4 (2019-12-18)
- Bugfixes:
- Calculating series with unknown timezones will produce infinite loop (#320)
Expand Down

0 comments on commit 218cc58

Please sign in to comment.