Skip to content

Commit

Permalink
#42 upgrade eslint to version nine
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanve committed Aug 27, 2024
1 parent 6adcca8 commit a12d52b
Show file tree
Hide file tree
Showing 7 changed files with 860 additions and 912 deletions.
13 changes: 0 additions & 13 deletions .eslintrc.json

This file was deleted.

8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ npm install eol --save
### `require` or `import`

```js
const eol = require('eol')
const eol = require("eol")
```

```js
import eol from 'eol'
import eol from "eol"
```

## API
Expand Down Expand Up @@ -71,8 +71,8 @@ eol.split(text).slice(-3).join(eol.auto) // last 3 lines joined
Detect or inspect via match

```js
eol.match(' ') // []
eol.match('world\nwide\nweb') // ['\n','\n']
eol.match(" ") // []
eol.match("world\nwide\nweb") // ["\n","\n"]
```

### Dubbing
Expand Down
26 changes: 13 additions & 13 deletions eol.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
!function(root, name, make) {
if (typeof module != 'undefined' && module.exports) module.exports = make()
if (typeof module != "undefined" && module.exports) module.exports = make()
else root[name] = make()
}(this, 'eol', function() {
}(this, "eol", function() {

var api = {}
var isWindows = typeof process != 'undefined' && 'win32' === process.platform
var linebreak = isWindows ? '\r\n' : '\n'
var isWindows = typeof process != "undefined" && "win32" === process.platform
var linebreak = isWindows ? "\r\n" : "\n"
var newline = /\r\n|\r|\n/g

function before(text) {
Expand Down Expand Up @@ -34,14 +34,14 @@
return text.split(newline)
}

api['lf'] = dub('\n')
api['cr'] = dub('\r')
api['crlf'] = dub('\r\n')
api['auto'] = dub(linebreak)
api['before'] = before
api['after'] = after
api['match'] = match
api['split'] = split
api['dub'] = dub
api["lf"] = dub("\n")
api["cr"] = dub("\r")
api["crlf"] = dub("\r\n")
api["auto"] = dub(linebreak)
api["before"] = before
api["after"] = after
api["match"] = match
api["split"] = split
api["dub"] = dub
return api
});
6 changes: 6 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module.exports = {
rules: {
"indent": ["error", 2],
"quotes": ["error", "double"]
}
}
Loading

0 comments on commit a12d52b

Please sign in to comment.