Skip to content

Commit

Permalink
test(lint): Fix linting issues
Browse files Browse the repository at this point in the history
  • Loading branch information
adrianlee44 committed Jan 6, 2021
1 parent 4d6fdfa commit 7ec207d
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 17 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
build/
23 changes: 9 additions & 14 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,14 @@
{
"extends": ["eslint:recommended", "plugin:prettier/recommended"],
"parser": "@typescript-eslint/parser",
"plugins": ["@typescript-eslint"],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"prettier/@typescript-eslint",
"plugin:prettier/recommended"
],
"env": {"node": true, "browser": true},
"rules": {
"no-trailing-spaces": ["error"]
},
"overrides": [
{
"files": ["test/*.js"],
"env": {
"node": true,
"es6": true
},
"parserOptions": {
"sourceType": "module"
}
}
]
}
}
3 changes: 1 addition & 2 deletions src/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ interface Ical2JsonOptions {
* @param {Object} options
* @return {Promise}
*/
export default function (options: Ical2JsonOptions) {
const filePromises = [];
export default function (options: Ical2JsonOptions): boolean {
const files = options.args || [];

for (let i = 0; i < files.length; i++) {
Expand Down
2 changes: 1 addition & 1 deletion src/ical2json.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ function convert(source: string): IcalObject {
function revert(object: IcalObject): string {
const lines = [];

for (let key in object) {
for (const key in object) {
const value = object[key];
if (Array.isArray(value)) {
if (key === 'RDATE') {
Expand Down

0 comments on commit 7ec207d

Please sign in to comment.