Skip to content

Commit

Permalink
feat: switch to native ESM with exports
Browse files Browse the repository at this point in the history
Also:
- chore: update devDeps. and lint
- chore: switch to pnpm
  • Loading branch information
brettz9 committed Oct 1, 2024
1 parent 8f1aee6 commit 88599fd
Show file tree
Hide file tree
Showing 17 changed files with 7,753 additions and 6,149 deletions.
3 changes: 0 additions & 3 deletions .eslintignore

This file was deleted.

68 changes: 0 additions & 68 deletions .eslintrc.js

This file was deleted.

1 change: 1 addition & 0 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ rollup.config.js
test
.nyc_output
coverage
eslint.config.js
8 changes: 0 additions & 8 deletions .remarkrc

This file was deleted.

9 changes: 4 additions & 5 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
# CHANGES for `handle-node`

## ?
## 0.4.0

- Linting: As per latest ash-nazg/ESLint 7
- npm: Update `rollup-plugin-babel` to `@rollup/plugin-babel`
- npm: Add missing peer dep.
- npm: Update devDeps
- feat: switch to native ESM with exports
- chore: update devDeps. and lint
- chore: switch to pnpm

## 0.3.0

Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,17 @@ DOM `NodeIterator`s or `TreeWalker`s.

## Installation

### With ESM bundler (e.g., Rollup)
```shell
npm install handle-node
```

### Native ESM

```js
import handleNode from 'handle-node';
```

### Node

```
npm install handle-node
```
### CommonJS

```js
const handleNode = require('handle-node');
Expand Down
2 changes: 1 addition & 1 deletion dist/index-esm.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/index-esm.min.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/index-umd.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/index-umd.min.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

47 changes: 47 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
import ashNazg from 'eslint-config-ash-nazg';

export default [
{
ignores: [
'dist',
'coverage'
]
},
...ashNazg(['sauron', 'node']),
// Our Markdown rules (and used for JSDoc examples as well, by way of
// our use of `matchingFileName` in conjunction with
// `jsdoc/check-examples` within `ash-nazg`)
{
files: ['*.md/*.js'],
rules: {
'eol-last': ['off'],
'no-console': ['off'],
'no-undef': ['off'],
'no-unused-vars': ['off'],
'padded-blocks': ['off'],
'import/unambiguous': ['off'],
'import/no-commonjs': ['off'],
'import/no-unresolved': ['off'],
'n/no-missing-import': ['error', {
allowModules: ['handle-node']
}],
'n/no-missing-require': ['error', {
allowModules: ['handle-node']
}]
}
},
{
files: ['test/**'],
rules: {
'chai-expect/missing-assertion': 2,
'chai-expect/terminating-properties': 1,
'import/unambiguous': 0
}
},
{
rules: {
// Override these `ash-nazg/sauron` rules which are difficult for us
// to apply at this time
}
}
];
Loading

0 comments on commit 88599fd

Please sign in to comment.