Skip to content

Commit 3641f15

Browse files
committed
rename xounicorn
Didn't make sense to bind it to the XO name as it can be useful for anyone not using XO.
1 parent 6a622d6 commit 3641f15

File tree

5 files changed

+31
-27
lines changed

5 files changed

+31
-27
lines changed

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
* text=auto
2+
*.js text eol=lf

index.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ module.exports = {
1313
sourceType: 'module'
1414
},
1515
rules: {
16-
'xo/catch-error-name': ['error', {name: 'err'}],
17-
'xo/explicit-length-check': 'error',
18-
'xo/filename-case': ['error', {case: 'kebabCase'}],
19-
'xo/no-abusive-eslint-disable': 'error',
20-
'xo/no-process-exit': 'error',
21-
'xo/throw-new-error': 'error'
16+
'unicorn/catch-error-name': ['error', {name: 'err'}],
17+
'unicorn/explicit-length-check': 'error',
18+
'unicorn/filename-case': ['error', {case: 'kebabCase'}],
19+
'unicorn/no-abusive-eslint-disable': 'error',
20+
'unicorn/no-process-exit': 'error',
21+
'unicorn/throw-new-error': 'error'
2222
}
2323
}
2424
}

package.json

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
2-
"name": "eslint-plugin-xo",
2+
"name": "eslint-plugin-unicorn",
33
"version": "1.0.0",
4-
"description": "ESLint rules for XO",
4+
"description": "Various awesome ESLint rules",
55
"license": "MIT",
6-
"repository": "sindresorhus/eslint-plugin-xo",
6+
"repository": "sindresorhus/eslint-plugin-unicorn",
77
"author": {
88
"name": "Sindre Sorhus",
99
"email": "[email protected]",
@@ -36,10 +36,11 @@
3636
"eslint",
3737
"eslintplugin",
3838
"eslint-plugin",
39-
"xo",
39+
"unicorn",
4040
"linter",
4141
"lint",
42-
"style"
42+
"style",
43+
"xo"
4344
],
4445
"dependencies": {
4546
"lodash.camelcase": "^4.1.1",

readme.md

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
1-
# eslint-plugin-xo [![Build Status](https://travis-ci.org/sindresorhus/eslint-plugin-xo.svg?branch=master)](https://travis-ci.org/sindresorhus/eslint-plugin-xo) [![Coverage Status](https://coveralls.io/repos/github/sindresorhus/eslint-plugin-xo/badge.svg?branch=master)](https://coveralls.io/github/sindresorhus/eslint-plugin-xo?branch=master)
1+
# eslint-plugin-unicorn [![Build Status](https://travis-ci.org/sindresorhus/eslint-plugin-unicorn.svg?branch=master)](https://travis-ci.org/sindresorhus/eslint-plugin-unicorn) [![Coverage Status](https://coveralls.io/repos/github/sindresorhus/eslint-plugin-unicorn/badge.svg?branch=master)](https://coveralls.io/github/sindresorhus/eslint-plugin-unicorn?branch=master)
22

3-
> ESLint rules for [XO](https://github.com/sindresorhus/xo)
3+
<img src="https://cloud.githubusercontent.com/assets/170270/18659176/1cc373d0-7f33-11e6-890f-0ba35362ee7e.jpg" width="180" align="right">
44

5-
This plugin is bundled with XO, but can still be useful if you don't use XO.
5+
> Various awesome ESLint rules
6+
7+
You might want to check out [XO](https://github.com/sindresorhus/xo), which includes this plugin.
68

79

810
## Install
911

1012
```
11-
$ npm install --save-dev eslint eslint-plugin-xo
13+
$ npm install --save-dev eslint eslint-plugin-unicorn
1214
```
1315

1416

@@ -24,19 +26,19 @@ Configure it in `package.json`.
2426
"es6": true
2527
},
2628
"parserOptions": {
27-
"ecmaVersion": 7,
29+
"ecmaVersion": 2016,
2830
"sourceType": "module"
2931
},
3032
"plugins": [
31-
"xo"
33+
"unicorn"
3234
],
3335
"rules": {
34-
"xo/catch-error-name": ["error", {"name": "err"}],
35-
"xo/explicit-length-check": "error",
36-
"xo/filename-case": ["error", {"case": "kebabCase"}],
37-
"xo/no-abusive-eslint-disable": "error",
38-
"xo/no-process-exit": "error",
39-
"xo/throw-new-error": "error"
36+
"unicorn/catch-error-name": ["error", {"name": "err"}],
37+
"unicorn/explicit-length-check": "error",
38+
"unicorn/filename-case": ["error", {"case": "kebabCase"}],
39+
"unicorn/no-abusive-eslint-disable": "error",
40+
"unicorn/no-process-exit": "error",
41+
"unicorn/throw-new-error": "error"
4042
}
4143
}
4244
}
@@ -64,9 +66,9 @@ Enable it in your `package.json` with the `extends` option:
6466
"name": "my-awesome-project",
6567
"eslintConfig": {
6668
"plugins": [
67-
"xo"
69+
"unicorn"
6870
],
69-
"extends": "plugin:xo/recommended"
71+
"extends": "plugin:unicorn/recommended"
7072
}
7173
}
7274
```
@@ -81,7 +83,7 @@ See the [ESLint docs](http://eslint.org/docs/user-guide/configuring#extending-co
8183
- [Sindre Sorhus](https://github.com/sindresorhus)
8284
- [James Talmage](https://github.com/jamestalmage)
8385
- [Jeroen Engels](https://github.com/jfmengels)
84-
- [Contributors…](https://github.com/sindresorhus/eslint-plugin-xo/graphs/contributors)
86+
- [Contributors…](../../graphs/contributors)
8587

8688

8789
## License

test/package.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ test('Every rule is defined in index file', async t => {
1010
rules.forEach(file => {
1111
const name = file.slice(0, -3);
1212
t.truthy(index.rules[name], `'${name}' is not exported in 'index.js'`);
13-
t.truthy(index.configs.recommended.rules[`xo/${name}`], `'${name}' is not set in the recommended config`);
13+
t.truthy(index.configs.recommended.rules[`unicorn/${name}`], `'${name}' is not set in the recommended config`);
1414
});
1515

1616
t.is(Object.keys(index.rules).length, rules.length,

0 commit comments

Comments
 (0)