Skip to content

Commit

Permalink
feat: require node >= 12, modernize, bump deps
Browse files Browse the repository at this point in the history
  • Loading branch information
titanism committed Jul 4, 2022
1 parent 68253f6 commit d0c6d8b
Show file tree
Hide file tree
Showing 26 changed files with 991 additions and 790 deletions.
3 changes: 3 additions & 0 deletions .commitlintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
extends: ['@commitlint/config-conventional']
};
9 changes: 9 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
root = true

[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
!.*.js
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* text=auto eol=lf
52 changes: 0 additions & 52 deletions .github/ISSUE_TEMPLATE.md

This file was deleted.

27 changes: 27 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: CI
on:
- push
- pull_request
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- ubuntu-latest
node_version:
- 12
- 14
- 16
- 18
name: Node ${{ matrix.node_version }} on ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node_version }}
- name: Install dependencies
run: npm install
- name: Run tests
run: npm run test
23 changes: 8 additions & 15 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,22 +1,15 @@
# OS #
###################
.DS_Store
*.log
.idea
Thumbs.db
tmp/
temp/


# Node.js #
###################
node_modules
coverage
.nyc_output
locales/
package-lock.json
yarn.lock
*.log


# NYC #
###################
coverage
Thumbs.db
tmp/
temp/
*.lcov
.nyc_output
.env
4 changes: 4 additions & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx --no-install commitlint --edit $1
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"

npx --no-install lint-staged && npm test
5 changes: 5 additions & 0 deletions .lintstagedrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
'*.md': (filenames) => filenames.map((filename) => `remark ${filename} -qfo`),
'package.json': 'fixpack',
'*.js': 'xo --fix'
};
2 changes: 1 addition & 1 deletion .npmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
package-lock=false
package-lock=false
5 changes: 5 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
singleQuote: true,
bracketSpacing: true,
trailingComma: 'none'
};
3 changes: 3 additions & 0 deletions .remarkrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
plugins: ['preset-github']
};
8 changes: 0 additions & 8 deletions .travis.yml

This file was deleted.

36 changes: 36 additions & 0 deletions .xo-config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
module.exports = {
prettier: true,
space: true,
extends: ['xo-lass'],
overrides: [
{
files: ['test/**/*.js'],
env: ['mocha']
}
],
rules: {
'array-callback-return': 'warn',
'func-names': 'warn',
'import/order': 'warn',
'n/no-deprecated-api': 'warn',
'n/prefer-global/process': 'warn',
'n/prefer-promises/fs': 'warn',
'new-cap': 'warn',
'no-bitwise': 'warn',
'no-implicit-coercion': 'warn',
'no-inner-declarations': 'warn',
'no-multi-assign': 'warn',
'no-redeclare': 'warn',
'no-return-assign': 'warn',
'no-unused-vars': 'warn',
'no-use-extend-native/no-use-extend-native': 'warn',
'no-useless-call': 'warn',
'no-var': 'warn',
'prefer-const': 'warn',
'prefer-rest-params': 'warn',
'prefer-spread': 'warn',
'unicorn/explicit-length-check': 'warn',
'unicorn/no-array-reduce': 'warn',
'unicorn/prefer-spread': 'warn'
}
};
Loading

0 comments on commit d0c6d8b

Please sign in to comment.