Skip to content

Commit

Permalink
style: add prettier and eslint (#328)
Browse files Browse the repository at this point in the history
* style: execute prettier on all code files
build: add prettier to devDependencies

* refactor: var to const/let

* build: add simple eslint config & packages

* refactor: optimize re-export of "is-ip"

* refactor: optimize re-export of "is-ip"

* chore: update eslint config

* style: execute prettier on all code files
chore: update prettier config

* build: remove eslint-plugin-prettier

* chore: add editorconfig

* chore: update npm eslint script and cleanup eslint config file
  • Loading branch information
Trickfilm400 authored May 23, 2024
1 parent e5fddbb commit bd11864
Show file tree
Hide file tree
Showing 14 changed files with 1,235 additions and 541 deletions.
9 changes: 9 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
root = true

[*]
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
charset = utf-8
indent_style = space
indent_size = 2
10 changes: 10 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"bracketSpacing": false,
"printWidth": 80,
"semi": true,
"singleQuote": true,
"tabWidth": 2,
"trailingComma": "none",
"useTabs": false,
"arrowParens": "always"
}
9 changes: 9 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import js from '@eslint/js';
import mocha from 'eslint-plugin-mocha';
export default [
mocha.configs.flat.recommended,
{
...js.configs.recommended,
files: ['**/*.js']
}
];
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
import fn from "./lib/http.js";
import fn from './lib/http.js';
export default fn;
Loading

0 comments on commit bd11864

Please sign in to comment.