Skip to content

Commit

Permalink
wip: migrate to bun
Browse files Browse the repository at this point in the history
  • Loading branch information
jdalton committed Sep 16, 2023
1 parent 2da024c commit 97d4a2f
Show file tree
Hide file tree
Showing 1,278 changed files with 35,746 additions and 32,358 deletions.
29 changes: 29 additions & 0 deletions .commitlintrc.js
@@ -0,0 +1,29 @@
'use strict';

module.exports = {
extends: [
'@commitlint/config-conventional', // scoped packages are not prefixed
],
rules: {
'type-enum': [
2,
'always',
[
'build',
'chore',
'ci',
'docs',
'feat',
'fix',
'perf',
'proposal',
'refactor',
'release',
'revert',
'style',
'test',
'wip',
],
],
},
};
5 changes: 5 additions & 0 deletions .eslintignore
@@ -0,0 +1,5 @@
coverage/
coverage-merged/
dist/
node_modules/
types/
98 changes: 98 additions & 0 deletions .eslintrc
@@ -0,0 +1,98 @@
{
"extends": ["airbnb-base", "prettier"],
"root": true,
"env": {
"amd": true,
"browser": true,
"es6": true,
"jest": true,
"node": true
},
"globals": {
"BigInt": "readonly",
"BigInt64Array": "readonly",
"BigUint64Array": "readonly",
"globalThis": "readonly"
},
"parserOptions": {
"ecmaVersion": 2020,
"sourceType": "module"
},
"plugins": [
"prettier"
],
"rules": {
"prettier/prettier": "error",
// Overridden
"no-eval": "off",
"camelcase": ["error", { "properties": "never", "allow": [ "W[0-9]+_"] }],
"import/extensions": "off",
// @TODO: Fix the following rules progressively.
"arrow-body-style": "warn",
"prefer-arrow-callback": "warn",
"prefer-object-spread": "off",
"max-classes-per-file": "off",
"dot-notation": "off",
"object-shorthand": "off",
"no-param-reassign": "off",
"no-cond-assign": "off",
"prefer-destructuring": "off",
"func-names": "off",
"no-nested-ternary": "off",
"no-plusplus": "off",
"strict": "off",
"no-restricted-syntax": "off",
"import/no-mutable-exports": "off",
"guard-for-in": "off",
"import/prefer-default-export": "off",
"prefer-rest-params": "off",
"one-var": "off",
"prefer-spread": "off",
"no-lonely-if": "off",
"no-prototype-builtins": "off",
"no-continue": "off",
"no-shadow": "off",
// Rules up for discussion.
"no-multi-assign": "off",
"new-cap": "off"
},
"overrides": [
{
"files": ["**/*.ts"],
"parserOptions": {
"project": "./tsconfig.json"
},
"extends": [
"airbnb-typescript/base",
"prettier"
],
"plugins": ["@typescript-eslint"],
"rules": {
"@typescript-eslint/no-unused-vars": [
"warn",
{
"vars": "all",
"args": "after-used",
"ignoreRestSiblings": true,
"argsIgnorePattern": "^_" // For tsc compatibility.
}
],
"comma-dangle": "off",
"implicit-arrow-linebreak": "off", // Conflicts with prettier.
"import/extensions": "off",
"import/prefer-default-export": "off",
"operator-linebreak": "off",
"object-curly-newline": "off",
"prefer-rest-params": "off", // We need to use params.
"prettier/prettier": "error",
"@typescript-eslint/no-shadow": "warn",
"@typescript-eslint/no-use-before-define": ["warn", { "functions": false }],
"import/no-cycle": "warn",
"no-bitwise": "off",
"no-unsafe-finally": "warn",
"no-param-reassign": "off",
"no-shadow": "warn"
}
}
]
}
125 changes: 0 additions & 125 deletions .eslintrc.js

This file was deleted.

1 change: 1 addition & 0 deletions .gitattributes
@@ -1 +1,2 @@
* text=auto
*.lockb binary diff=lockb
5 changes: 3 additions & 2 deletions .gitignore
@@ -1,7 +1,8 @@
.DS_Store
*.log*
doc/*.html
node_modules
dist/
node_modules/
*.code-workspace
*.lockb
*.sublime-project
*.sublime-workspace
1 change: 1 addition & 0 deletions .husky/.gitignore
@@ -0,0 +1 @@
_
4 changes: 4 additions & 0 deletions .husky/commit-msg
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

bun run commitlint --edit "$1"
4 changes: 4 additions & 0 deletions .husky/pre-commit
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

bun run lint-staged
5 changes: 5 additions & 0 deletions .prettierignore
@@ -0,0 +1,5 @@
coverage/
coverage-merged/
dist/
node_modules/
types/
6 changes: 6 additions & 0 deletions .prettierrc
@@ -0,0 +1,6 @@
{
"printWidth": 100,
"useTabs": false,
"tabWidth": 4,
"singleQuote": true
}
18 changes: 5 additions & 13 deletions README.md
Expand Up @@ -2,18 +2,14 @@

[Site](https://lodash.com/) |
[Docs](https://lodash.com/docs) |
[FP Guide](https://github.com/lodash/lodash/wiki/FP-Guide) |
[Contributing](https://github.com/lodash/lodash/blob/master/.github/CONTRIBUTING.md) |
[Wiki](https://github.com/lodash/lodash/wiki "Changelog, Roadmap, etc.") |
[Code of Conduct](https://code-of-conduct.openjsf.org) |
[Twitter](https://twitter.com/bestiejs) |
[Chat](https://gitter.im/lodash/lodash)
[Code of Conduct](https://code-of-conduct.openjsf.org)

The [Lodash](https://lodash.com/) library exported as a [UMD](https://github.com/umdjs/umd) module.

Generated using [lodash-cli](https://www.npmjs.com/package/lodash-cli):
```shell
$ npm run build
$ bun run build
$ lodash -o ./dist/lodash.js
$ lodash core -o ./dist/lodash.core.js
```
Expand All @@ -34,14 +30,12 @@ In a browser:
<script src="lodash.js"></script>
```

Using npm:
Using bun:
```shell
$ npm i -g npm
$ npm i lodash
$ bun i lodash
```
Note: add `--save` if you are using npm < 5.0.0

In Node.js:
In [Bun](https://bun.sh):
```js
// Load the full build.
var _ = require('lodash');
Expand Down Expand Up @@ -76,5 +70,3 @@ Lodash is available in a [variety of builds](https://lodash.com/custom-builds) &

* [lodash](https://www.npmjs.com/package/lodash) & [per method packages](https://www.npmjs.com/search?q=keywords:lodash-modularized)
* [lodash-es](https://www.npmjs.com/package/lodash-es), [babel-plugin-lodash](https://www.npmjs.com/package/babel-plugin-lodash), & [lodash-webpack-plugin](https://www.npmjs.com/package/lodash-webpack-plugin)
* [lodash/fp](https://github.com/lodash/lodash/tree/npm/fp)
* [lodash-amd](https://www.npmjs.com/package/lodash-amd)
18 changes: 0 additions & 18 deletions add.js

This file was deleted.

30 changes: 0 additions & 30 deletions after.js

This file was deleted.

0 comments on commit 97d4a2f

Please sign in to comment.