Skip to content

Commit f24adfc

Browse files
authored
chore: remove xo in favor of stricter prettier setup (conventional-changelog#555)
* chore: remove xo in favor of stricter prettier setup * chore: add prettierignore * chore: restore ava config * style: nicer json formatting
1 parent dc808de commit f24adfc

File tree

42 files changed

+385
-989
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+385
-989
lines changed

.github/CONTRIBUTING.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ To keep the code base of commitlint neat and tidy the following rules apply to e
4040

4141
> Coding standards
4242
43-
* [Happiness](https://github.com/sindresorhus/xo) enforced
43+
* `prettier` is king
4444
* Favor micro library over swiss army knives (rimraf, ncp vs. fs-extra)
4545
* Be awesome
4646

.prettierignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
lib/

.vscode/settings.json

-4
This file was deleted.

@alias/commitlint-config-angular/package.json

-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
"deps": "dep-check",
1212
"pkg": "pkg-check"
1313
},
14-
"xo": false,
1514
"repository": {
1615
"type": "git",
1716
"url": "git+https://github.com/marionebl/commitlint.git"

@alias/commitlint-config-lerna-scopes/package.json

-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
"deps": "dep-check",
1212
"pkg": "pkg-check"
1313
},
14-
"xo": false,
1514
"repository": {
1615
"type": "git",
1716
"url": "git+https://github.com/marionebl/commitlint.git"

@alias/commitlint-config-patternplate/package.json

-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
"deps": "dep-check",
1212
"pkg": "pkg-check"
1313
},
14-
"xo": false,
1514
"repository": {
1615
"type": "git",
1716
"url": "git+https://github.com/marionebl/commitlint.git"

@alias/commitlint/package.json

-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
"deps": "dep-check",
1313
"pkg": "pkg-check --skip-main"
1414
},
15-
"xo": false,
1615
"engines": {
1716
"node": ">=4"
1817
},

@commitlint/cli/package.json

+1-4
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
"clean": "npx rimraf lib",
1616
"deps": "dep-check",
1717
"pkg": "pkg-check",
18-
"lint": "xo",
1918
"start": "concurrently \"ava -c 4 --verbose --watch\" \"yarn run watch\"",
2019
"test": "ava -c 4 --verbose",
2120
"watch": "babel src --out-dir lib --watch --source-maps"
@@ -33,7 +32,6 @@
3332
"babel-preset-commitlint"
3433
]
3534
},
36-
"xo": false,
3735
"engines": {
3836
"node": ">=4"
3937
},
@@ -71,8 +69,7 @@
7169
"rimraf": "2.6.2",
7270
"sander": "0.6.0",
7371
"string-to-stream": "1.1.0",
74-
"tmp": "0.0.33",
75-
"xo": "0.20.3"
72+
"tmp": "0.0.33"
7673
},
7774
"dependencies": {
7875
"@commitlint/format": "^7.4.0",

@commitlint/cli/src/help.js

+5-3
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,14 @@ module.exports = flags => {
2121
const flags = line[0];
2222
const desc = line[1];
2323
const defaults = line[2];
24-
const fs = flags.map(
25-
flag => (flag.length > 1 ? `--${flag}` : ` -${flag}`)
24+
const fs = flags.map(flag =>
25+
flag.length > 1 ? `--${flag}` : ` -${flag}`
2626
);
2727
const ds = defaults ? `, defaults to: ${defaults}` : '';
2828
const length = flags.reduce((sum, flag) => sum + flag.length, 0);
29-
return `${fs.join(',')}${' '.repeat(Math.max(4 + longest - length, 0))}${desc}${ds}`;
29+
return `${fs.join(',')}${' '.repeat(
30+
Math.max(4 + longest - length, 0)
31+
)}${desc}${ds}`;
3032
})
3133
.join('\n');
3234
};

@commitlint/config-angular-type-enum/package.json

+1-4
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,9 @@
99
"clean": "exit 0",
1010
"deps": "dep-check",
1111
"pkg": "pkg-check",
12-
"lint": "xo",
1312
"start": "exit 0",
1413
"test": "exit 0"
1514
},
16-
"xo": false,
1715
"repository": {
1816
"type": "git",
1917
"url": "git+https://github.com/marionebl/commitlint.git"
@@ -31,7 +29,6 @@
3129
},
3230
"homepage": "https://github.com/marionebl/commitlint#readme",
3331
"devDependencies": {
34-
"@commitlint/utils": "^7.3.1",
35-
"xo": "0.20.3"
32+
"@commitlint/utils": "^7.3.1"
3633
}
3734
}

@commitlint/config-angular/package.json

-2
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,9 @@
99
"clean": "exit 0",
1010
"deps": "dep-check",
1111
"pkg": "pkg-check --skip-import",
12-
"lint": "xo",
1312
"start": "exit 0",
1413
"test": "exit 0"
1514
},
16-
"xo": false,
1715
"repository": {
1816
"type": "git",
1917
"url": "git+https://github.com/marionebl/commitlint.git"

@commitlint/config-conventional/package.json

-2
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,9 @@
99
"clean": "exit 0",
1010
"deps": "dep-check",
1111
"pkg": "pkg-check",
12-
"lint": "xo",
1312
"start": "exit 0",
1413
"test": "exit 0"
1514
},
16-
"xo": false,
1715
"publishConfig": {
1816
"access": "public"
1917
},

@commitlint/config-lerna-scopes/package.json

+1-4
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,11 @@
77
],
88
"scripts": {
99
"clean": "exit 0",
10-
"lint": "xo",
1110
"start": "ava --watch --verbose",
1211
"test": "ava --verbose",
1312
"deps": "dep-check",
1413
"pkg": "pkg-check"
1514
},
16-
"xo": false,
1715
"ava": {
1816
"files": [
1917
"test.js"
@@ -52,7 +50,6 @@
5250
"@commitlint/utils": "^7.3.1",
5351
"@lerna/project": "3.5.0",
5452
"ava": "0.22.0",
55-
"lerna": "3.1.1",
56-
"xo": "0.20.3"
53+
"lerna": "3.1.1"
5754
}
5855
}

@commitlint/config-patternplate/package.json

+1-4
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,9 @@
99
"clean": "exit 0",
1010
"deps": "dep-check",
1111
"pkg": "pkg-check --skip-import",
12-
"lint": "xo",
1312
"start": "exit 0",
1413
"test": "exit 0"
1514
},
16-
"xo": false,
1715
"repository": {
1816
"type": "git",
1917
"url": "git+https://github.com/marionebl/commitlint.git"
@@ -36,7 +34,6 @@
3634
"lodash": "4.17.11"
3735
},
3836
"devDependencies": {
39-
"@commitlint/utils": "^7.3.1",
40-
"xo": "0.20.3"
37+
"@commitlint/utils": "^7.3.1"
4138
}
4239
}

@commitlint/core/package.json

+1-6
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,8 @@
77
],
88
"scripts": {
99
"deps": "dep-check",
10-
"pkg": "pkg-check --skip-import",
11-
"lint": "xo"
10+
"pkg": "pkg-check --skip-import"
1211
},
13-
"xo": false,
1412
"engines": {
1513
"node": ">=4"
1614
},
@@ -33,9 +31,6 @@
3331
"email": "[email protected]"
3432
},
3533
"license": "MIT",
36-
"devDependencies": {
37-
"xo": "0.20.3"
38-
},
3934
"dependencies": {
4035
"@commitlint/format": "^7.4.0",
4136
"@commitlint/lint": "^7.4.0",

@commitlint/ensure/package.json

+1-4
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
"clean": "npx rimraf lib",
1212
"deps": "dep-check",
1313
"pkg": "pkg-check --skip-import",
14-
"lint": "xo",
1514
"start": "concurrently \"ava -c 4 --verbose --watch\" \"yarn run watch\"",
1615
"test": "ava -c 4 --verbose",
1716
"watch": "babel src --out-dir lib --watch --source-maps"
@@ -35,7 +34,6 @@
3534
"babel-preset-commitlint"
3635
]
3736
},
38-
"xo": false,
3937
"engines": {
4038
"node": ">=4"
4139
},
@@ -68,8 +66,7 @@
6866
"concurrently": "3.5.1",
6967
"cross-env": "5.1.1",
7068
"globby": "8.0.1",
71-
"rimraf": "2.6.1",
72-
"xo": "0.20.3"
69+
"rimraf": "2.6.1"
7370
},
7471
"dependencies": {
7572
"lodash": "4.17.11"

@commitlint/ensure/src/case.js

+6-3
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,13 @@ function ensureCase(raw = '', target = 'lowercase') {
88
const input = String(raw)
99
.replace(/`.*?`|".*?"|'.*?'/g, '')
1010
.trim();
11-
11+
1212
const delimiters = /(\/|\\)/g;
13-
const transformed = input.split(delimiters)
14-
.map(segment => delimiters.test(segment) ? segment : toCase(segment, target))
13+
const transformed = input
14+
.split(delimiters)
15+
.map(segment =>
16+
delimiters.test(segment) ? segment : toCase(segment, target)
17+
)
1518
.join('');
1619

1720
if (transformed === '' || transformed.match(/^\d/)) {

@commitlint/execute-rule/package.json

+3-5
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"clean": "npx rimraf lib",
1212
"deps": "dep-check",
1313
"pkg": "pkg-check",
14-
"lint": "xo",
14+
1515
"start": "concurrently \"ava -c 4 --verbose --watch\" \"yarn run watch\"",
1616
"test": "ava -c 4 --verbose",
1717
"watch": "babel src --out-dir lib --watch --source-maps"
@@ -35,7 +35,7 @@
3535
"babel-preset-commitlint"
3636
]
3737
},
38-
"xo": false,
38+
3939
"engines": {
4040
"node": ">=4"
4141
},
@@ -68,9 +68,7 @@
6868
"babel-register": "6.26.0",
6969
"concurrently": "3.5.1",
7070
"cross-env": "5.1.1",
71-
"rimraf": "2.6.1",
72-
"xo": "0.20.3"
73-
},
71+
"rimraf": "2.6.1" },
7472
"dependencies": {
7573
"babel-runtime": "6.26.0"
7674
}

@commitlint/format/package.json

+3-5
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"clean": "npx rimraf lib",
1212
"deps": "dep-check",
1313
"pkg": "pkg-check --skip-import",
14-
"lint": "xo",
14+
1515
"start": "concurrently \"ava -c 4 --verbose --watch\" \"yarn run watch\"",
1616
"test": "ava -c 4 --verbose",
1717
"watch": "babel src --out-dir lib --watch --source-maps"
@@ -35,7 +35,7 @@
3535
"babel-preset-commitlint"
3636
]
3737
},
38-
"xo": false,
38+
3939
"engines": {
4040
"node": ">=4"
4141
},
@@ -68,9 +68,7 @@
6868
"concurrently": "3.5.1",
6969
"cross-env": "5.1.1",
7070
"lodash": "4.17.11",
71-
"rimraf": "2.6.1",
72-
"xo": "0.20.3"
73-
},
71+
"rimraf": "2.6.1" },
7472
"dependencies": {
7573
"babel-runtime": "^6.23.0",
7674
"chalk": "^2.0.1"

@commitlint/is-ignored/package.json

+3-5
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"clean": "npx rimraf lib",
1212
"deps": "dep-check",
1313
"pkg": "pkg-check",
14-
"lint": "xo",
14+
1515
"start": "concurrently \"ava -c 4 --verbose --watch\" \"yarn run watch\"",
1616
"test": "ava -c 4 --verbose",
1717
"watch": "babel src --out-dir lib --watch --source-maps"
@@ -35,7 +35,7 @@
3535
"babel-preset-commitlint"
3636
]
3737
},
38-
"xo": false,
38+
3939
"engines": {
4040
"node": ">=4"
4141
},
@@ -68,9 +68,7 @@
6868
"babel-register": "6.26.0",
6969
"concurrently": "3.5.1",
7070
"cross-env": "5.1.1",
71-
"rimraf": "2.6.1",
72-
"xo": "0.20.3"
73-
},
71+
"rimraf": "2.6.1" },
7472
"dependencies": {
7573
"semver": "5.6.0"
7674
}

@commitlint/lint/package.json

+3-5
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"clean": "npx rimraf lib",
1212
"deps": "dep-check",
1313
"pkg": "pkg-check --skip-import",
14-
"lint": "xo",
14+
1515
"start": "concurrently \"ava -c 4 --verbose --watch\" \"yarn run watch\"",
1616
"test": "ava -c 4 --verbose",
1717
"watch": "babel src --out-dir lib --watch --source-maps"
@@ -35,7 +35,7 @@
3535
"babel-preset-commitlint"
3636
]
3737
},
38-
"xo": false,
38+
3939
"engines": {
4040
"node": ">=4"
4141
},
@@ -69,9 +69,7 @@
6969
"cross-env": "5.1.1",
7070
"execa": "0.9.0",
7171
"globby": "8.0.1",
72-
"rimraf": "2.6.1",
73-
"xo": "0.20.3"
74-
},
72+
"rimraf": "2.6.1" },
7573
"dependencies": {
7674
"@commitlint/is-ignored": "^7.3.1",
7775
"@commitlint/parse": "^7.3.1",

@commitlint/load/package.json

+3-5
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"clean": "npx rimraf lib",
1212
"deps": "dep-check",
1313
"pkg": "pkg-check --skip-import",
14-
"lint": "xo",
14+
1515
"start": "concurrently \"ava -c 4 --verbose --watch\" \"yarn run watch\"",
1616
"test": "ava -c 4 --verbose && ava \"src/*.serial-test.js\" --verbose",
1717
"watch": "babel src --out-dir lib --watch --source-maps"
@@ -35,7 +35,7 @@
3535
"babel-preset-commitlint"
3636
]
3737
},
38-
"xo": false,
38+
3939
"engines": {
4040
"node": ">=4"
4141
},
@@ -69,9 +69,7 @@
6969
"cross-env": "5.1.1",
7070
"execa": "0.9.0",
7171
"globby": "8.0.1",
72-
"rimraf": "2.6.1",
73-
"xo": "0.20.3"
74-
},
72+
"rimraf": "2.6.1" },
7573
"dependencies": {
7674
"@commitlint/execute-rule": "^7.3.1",
7775
"@commitlint/resolve-extends": "^7.3.1",

0 commit comments

Comments
 (0)