Skip to content

Commit

Permalink
refactor: changes after eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathas committed Jan 7, 2023
1 parent d6a5b67 commit 16766aa
Show file tree
Hide file tree
Showing 14 changed files with 1,739 additions and 362 deletions.
4 changes: 2 additions & 2 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ root = true

# Change these settings to your own preference
indent_style = space
indent_size = 4
indent_size = 2

# Tab indentation (no size specified)
[Makefile]
indent_style = tab
indent_style = space

# We recommend you to keep these unchanged
end_of_line = lf
Expand Down
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
test
36 changes: 36 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
module.exports = {
root: true,
env: {
node: true,
commonjs: true,
mocha: true,
es2021: true
},
extends: ['eslint:recommended', 'plugin:prettier/recommended'],
overrides: [],
parserOptions: {
ecmaVersion: 'latest'
},
rules: {
'linebreak-style': ['error', 'unix'],
quotes: ['error', 'single'],
semi: ['error', 'always'],
'max-len': ['error', { code: 100, ignorePattern: '^import' }],
'require-await': 'error',
'no-return-await': 'error',
'arrow-parens': ['warn', 'always'],
eqeqeq: ['error', 'always'],
curly: 'error',
'no-undef-init': 'error',
'prefer-const': 'error',
'no-eq-null': 'error',
'max-depth': ['error', 3],
'no-control-regex': 0,
'no-continue': 'warn',
'no-else-return': ['error', { allowElseIf: true }],
'no-duplicate-imports': 'error',
'lines-between-class-members': ['error', 'always'],
'max-lines-per-function': ['error', { max: 50, skipBlankLines: true, skipComments: true }],
'max-lines': ['warn', { max: 1000, skipBlankLines: false, skipComments: false }]
}
};
54 changes: 0 additions & 54 deletions .eslintrc.json

This file was deleted.

4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npm run lint
4 changes: 4 additions & 0 deletions .husky/pre-push
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npm test
5 changes: 4 additions & 1 deletion .npmignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
example
.editorconfig
.eslintrc.json
.eslintrc.js
.eslintignore
.husky
.release-it.js
changelog.hbs
commitlint.config.js
.travis.yml
.jshintrc
.istanbul.yml
test
.prettierrc
6 changes: 6 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"singleQuote": true,
"trailingComma": "none",
"printWidth": 100,
"arrowParens": "always"
}
2 changes: 1 addition & 1 deletion commitlint.config.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
module.exports = { extends: ['@commitlint/config-conventional'] };
module.exports = { extends: ['@commitlint/config-conventional'] };
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
module.exports = require('./lib/pdf2img');
module.exports = require('./lib/pdf2img');
Loading

0 comments on commit 16766aa

Please sign in to comment.