Skip to content

Commit

Permalink
chore: bump deps, added configs as files instead of in pkg
Browse files Browse the repository at this point in the history
  • Loading branch information
titanism committed May 31, 2022
1 parent fa123f5 commit a9f9942
Show file tree
Hide file tree
Showing 10 changed files with 1,252 additions and 1,201 deletions.
3 changes: 3 additions & 0 deletions .commitlintrc.js
@@ -0,0 +1,3 @@
module.exports = {
extends: ['@commitlint/config-conventional']
};
4 changes: 2 additions & 2 deletions .husky/commit-msg
@@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env sh
. "$(dirname "$0")/_/husky.sh"

npx --no-install commitlint --edit $1
yarn commitlint --edit $1
7 changes: 3 additions & 4 deletions .husky/pre-commit
@@ -1,5 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

# enable next line when tests are fixed
# npm test
yarn lint-staged && yarn test
5 changes: 5 additions & 0 deletions .lintstagedrc.js
@@ -0,0 +1,5 @@
module.exports = {
"*.md": filenames => filenames.map(filename => `remark ${filename} -qfo`),
'package.json': 'fixpack',
'*.js': 'xo --fix'
};
5 changes: 5 additions & 0 deletions .prettierrc.js
@@ -0,0 +1,5 @@
module.exports = {
singleQuote: true,
bracketSpacing: true,
trailingComma: 'none'
};
3 changes: 3 additions & 0 deletions .remarkrc.js
@@ -0,0 +1,3 @@
module.exports = {
plugins: ['preset-github']
};
1 change: 1 addition & 0 deletions .travis.yml
@@ -1,6 +1,7 @@
sudo: false
language: node_js
node_js:
- '18'
- '16'
- '14'
- '12'
Expand Down
91 changes: 91 additions & 0 deletions .xo-config.js
@@ -0,0 +1,91 @@
module.exports = {
prettier: true,
space: true,
nodeVersion: false,
extends: [
'xo-lass',
],
envs: [
'node',
'browser',
],
overrides: [
{
files: 'test/**/*.js',
envs: [
'mocha',
],
rules: {
'block-scoped-var': 'warn',
complexity: 'warn',
'default-case': 'warn',
eqeqeq: 'warn',
'func-name-matching': 'warn',
'func-names': 'warn',
'guard-for-in': 'warn',
'handle-callback-err': 'warn',
'import/no-extraneous-dependencies': 'warn',
'import/no-unassigned-import': 'warn',
'import/order': 'warn',
'max-nested-callbacks': 'warn',
'new-cap': 'warn',
'no-eq-null': 'warn',
'no-extend-native': 'warn',
'no-implicit-coercion': 'warn',
'no-multi-assign': 'warn',
'no-negated-condition': 'warn',
'no-prototype-builtins': 'warn',
'no-redeclare': 'warn',
'no-undef': 'warn',
'no-unused-expressions': 'warn',
'no-unused-vars': 'warn',
'no-use-extend-native/no-use-extend-native': 'warn',
'no-useless-escape': 'warn',
'no-var': 'warn',
'no-void': 'warn',
'node/no-deprecated-api': 'warn',
'prefer-rest-params': 'warn',
'prefer-spread': 'warn',
'unicorn/filename-case': 'warn',
'valid-jsdoc': 'warn',
'node/no-path-concat': 'warn',
'unicorn/no-empty-file': 'warn',
},
},
],
rules: {
'unicorn/prevent-abbreviations': [
'warn',
{
replacements: {
res: false,
args: false,
fn: false,
err: false,
e: false,
i: false,
},
},
],
'no-bitwise': 'warn',
'node/prefer-global/buffer': 'warn',
'node/prefer-global/process': 'warn',
'unicorn/no-new-array': 'warn',
'unicorn/no-this-assignment': 'warn',
'unicorn/prefer-spread': 'warn',
'unicorn/catch-error-name': 'warn',
'unicorn/prefer-code-point': 'warn',
'node/no-unsupported-features': [
'error',
{
version: 8,
ignores: [
'syntax',
],
},
],
},
globals: [
'ActiveXObject',
],
};
164 changes: 21 additions & 143 deletions package.json
Expand Up @@ -12,11 +12,6 @@
"bugs": {
"url": "https://github.com/visionmedia/superagent/issues"
},
"commitlint": {
"extends": [
"@commitlint/config-conventional"
]
},
"contributors": [
"Kornel Lesiński <kornel@geekhood.net>",
"Peter Lyons <pete@peterlyons.com>",
Expand All @@ -37,11 +32,11 @@
"semver": "^7.3.7"
},
"devDependencies": {
"@babel/cli": "^7.17.6",
"@babel/core": "^7.17.9",
"@babel/plugin-transform-runtime": "^7.17.0",
"@babel/preset-env": "^7.16.11",
"@babel/runtime": "^7.17.9",
"@babel/cli": "^7.17.10",
"@babel/core": "^7.18.2",
"@babel/plugin-transform-runtime": "^7.18.2",
"@babel/preset-env": "^7.18.2",
"@babel/runtime": "^7.18.3",
"Base64": "^1.1.0",
"babelify": "^10.0.0",
"basic-auth-connect": "^1.0.0",
Expand All @@ -50,8 +45,8 @@
"codecov": "^3.8.3",
"cookie-parser": "^1.4.6",
"cross-env": "^7.0.3",
"express": "^4.18.0",
"express-session": "^1.17.2",
"express": "^4.18.1",
"express-session": "^1.17.3",
"fixpack": "^4.0.0",
"get-port": "4.2.0",
"marked": "^2.0.0",
Expand All @@ -64,19 +59,6 @@
"tinyify": "^3.0.0",
"zuul": "^3.12.0"
},
"optionalDependencies": {
"@commitlint/cli": "^16.2.3",
"@commitlint/config-conventional": "^16.2.1",
"eslint": "^8.14.0",
"eslint-config-xo-lass": "^1.0.6",
"eslint-plugin-compat": "^4.0.2",
"eslint-plugin-node": "^11.1.0",
"husky": "^7.0.4",
"lint-staged": "^12.4.1",
"remark-cli": "^10.0.1",
"remark-preset-github": "^4.0.1",
"xo": "^0.48.0"
},
"engines": {
"node": ">=6.4.0 <13 || >=14"
},
Expand Down Expand Up @@ -119,39 +101,25 @@
"xmlhttprequest"
],
"license": "MIT",
"lint-staged": {
"linters": {
"*.js": [
"xo --fix",
"git add"
],
"*.md": [
"remark . -qfo",
"git add"
],
"package.json": [
"fixpack",
"git add"
]
}
},
"main": "lib/node/index.js",
"prettier": {
"singleQuote": true,
"bracketSpacing": true,
"trailingComma": "none"
},
"remarkConfig": {
"plugins": [
"preset-github"
]
"optionalDependencies": {
"@commitlint/cli": "^17.0.1",
"@commitlint/config-conventional": "^17.0.0",
"eslint": "^8.16.0",
"eslint-config-xo-lass": "^1.0.6",
"eslint-plugin-compat": "^4.0.2",
"eslint-plugin-node": "^11.1.0",
"husky": "^8.0.1",
"lint-staged": "^12.5.0",
"remark-cli": "^10.0.1",
"remark-preset-github": "^4.0.1",
"xo": "^0.49.0"
},
"repository": {
"type": "git",
"url": "git://github.com/visionmedia/superagent.git"
},
"scripts": {
"prepare": "husky install",
"browserify": "browserify src/node/index.js -o dist/superagent.js -s superagent -g [ babelify --configFile ./.dist.babelrc ]",
"build": "npm run build:clean && npm run build:lib && npm run build:dist",
"build:clean": "rimraf lib dist",
Expand All @@ -162,99 +130,9 @@
"lint": "eslint -c .eslintrc src test && remark . -qfo && eslint -c .lib.eslintrc lib/**/*.js && eslint -c .dist.eslintrc dist/**/*.js",
"minify": "cross-env NODE_ENV=production browserify src/node/index.js -o dist/superagent.min.js -s superagent -g [ babelify --configFile ./.dist.babelrc ] -p tinyify",
"nyc": "cross-env NODE_ENV=test nyc ava",
"prepare": "husky install",
"test": "npm run build && npm run lint && make test",
"test-http2": "npm run build && npm run lint && make test-node-http2"
},
"unpkg": "dist/superagent.min.js",
"xo": {
"prettier": true,
"space": true,
"nodeVersion": false,
"extends": [
"xo-lass"
],
"envs": [
"node",
"browser"
],
"overrides": [
{
"files": "test/**/*.js",
"envs": [
"mocha"
],
"rules": {
"block-scoped-var": "warn",
"complexity": "warn",
"default-case": "warn",
"eqeqeq": "warn",
"func-name-matching": "warn",
"func-names": "warn",
"guard-for-in": "warn",
"handle-callback-err": "warn",
"import/no-extraneous-dependencies": "warn",
"import/no-unassigned-import": "warn",
"import/order": "warn",
"max-nested-callbacks": "warn",
"new-cap": "warn",
"no-eq-null": "warn",
"no-extend-native": "warn",
"no-implicit-coercion": "warn",
"no-multi-assign": "warn",
"no-negated-condition": "warn",
"no-prototype-builtins": "warn",
"no-redeclare": "warn",
"no-undef": "warn",
"no-unused-expressions": "warn",
"no-unused-vars": "warn",
"no-use-extend-native/no-use-extend-native": "warn",
"no-useless-escape": "warn",
"no-var": "warn",
"no-void": "warn",
"node/no-deprecated-api": "warn",
"prefer-rest-params": "warn",
"prefer-spread": "warn",
"unicorn/filename-case": "warn",
"valid-jsdoc": "warn",
"node/no-path-concat": "warn",
"unicorn/no-empty-file": "warn"
}
}
],
"rules": {
"unicorn/prevent-abbreviations": [
"warn",
{
"replacements": {
"res": false,
"args": false,
"fn": false,
"err": false,
"e": false,
"i": false
}
}
],
"no-bitwise": "warn",
"node/prefer-global/buffer": "warn",
"node/prefer-global/process": "warn",
"unicorn/no-new-array": "warn",
"unicorn/no-this-assignment": "warn",
"unicorn/prefer-spread": "warn",
"unicorn/catch-error-name": "warn",
"unicorn/prefer-code-point": "warn",
"node/no-unsupported-features": [
"error",
{
"version": 8,
"ignores": [
"syntax"
]
}
]
},
"globals": [
"ActiveXObject"
]
}
"unpkg": "dist/superagent.min.js"
}

0 comments on commit a9f9942

Please sign in to comment.