Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/node_modules
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are absolute paths. You need to use relative ones.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

/dist
/app/utils/BFS.js
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why?

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The BFS.js file caused too many errors/warnings and I wanted to address it separately

Copy link
Collaborator

@elektronik2k5 elektronik2k5 Jan 28, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Next time disable in the problematic file. See how to disable files/directories/lines/blocks in eslint docs.
There's legitimate reasons to disable the linting on different resolutions and now that you lint, you should know how to disable the linter when you need to.
An ignore file is for permanently ignored files/directories - which isn't this case.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

25 changes: 25 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
module.exports = {
"extends": "airbnb",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you're using JS instead of JSON, don't quote the keys.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume you don't mean the specific rule names (all those kebab case rule name are not happy without their quotes..), right?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, extends doesn't need quoting, but "react/jsx-uses-react" has to be quoted to be syntactically correct.

"plugins": ["react"],
"rules": {
"no-tabs": "off",
"react/jsx-uses-react": 2,
"react/jsx-uses-vars": 2,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I always use words instead of numbers, so the reader doesn't need to guess what 2 is.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good idea

"comma-dangle": ["error", {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inconsistent indentation

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

"arrays": "always-multiline",
"objects": "always",
"imports": "never",
"exports": "never",
"functions": "always-multiline"
}],
"react/jsx-filename-extension": ["error", { "extensions": [".js"] }],
"react/jsx-curly-spacing": ["error", "always", { "allowMultiline": true }],
// enforce spacing inside array brackets
'array-bracket-spacing': ['error', 'always'],
'react/forbid-prop-types': [0, { forbid: ['any', 'array', 'object'] }],
},
"globals": {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe if you set the right environment (DOM), eslint will add these for you.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you are right. done

"window": true,
"document": true,
}
};
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
/node_modules
/node_modules
/dist
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use relative paths.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

190 changes: 0 additions & 190 deletions app/components/App.js

This file was deleted.

Loading