Skip to content

Commit

Permalink
use .eslintrc.js
Browse files Browse the repository at this point in the history
  • Loading branch information
endiliey committed Jul 1, 2018
1 parent 417144b commit 417efda
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 17 deletions.
31 changes: 31 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
const OFF = 0;
const WARNING = 1;
const ERROR = 2;

module.exports = {
extends: [
'fbjs', // eslint-config-fbjs
'prettier' // eslint-config-prettier
],
overrides: [
{
files: ['lib/**/*.js'],
rules: {
// allow console
'no-console': OFF,
// require radix argument in parseInt
'radix': ERROR,
// disallow unused vars
'no-unused-vars': ERROR,
// almost certainly a bug
'no-duplicate-case': ERROR,
}
},
{
files: ['examples/**/*.js'],
rules: {
'no-unused-vars': OFF
}
}
]
};
16 changes: 0 additions & 16 deletions .eslintrc.json

This file was deleted.

2 changes: 1 addition & 1 deletion lib/server/readMetadata.js
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ function generateMetadataBlog() {
});

const sortedMetadatas = metadatas.sort(
(a, b) => parseInt(b.seconds) - parseInt(a.seconds)
(a, b) => parseInt(b.seconds, 10) - parseInt(a.seconds, 10)
);

fs.writeFileSync(
Expand Down

0 comments on commit 417efda

Please sign in to comment.