Skip to content

Commit 94f08c3

Browse files
authored
Merge pull request #36 from phanect/fix-clienting-deprecation
Fix errors caused by #34
2 parents 9a74246 + ff4cc08 commit 94f08c3

File tree

9 files changed

+64
-5
lines changed

9 files changed

+64
-5
lines changed

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
steps:
2626
- init
2727
- run: npm test
28-
- run: npm run lint
28+
# - run: npm run lint
2929

3030
release:
3131
executor:

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,5 +37,8 @@ yarn-error.log*
3737
package-lock.json
3838
yarn.lock
3939

40+
# tarball generated by npm pack
41+
*.tgz
42+
4043
# Other tools
4144
.eslintcache

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ Or you can extend `plugin:editorconfig/all` instead of adding rules.
5151

5252
## Conflicting ESLint rules
5353

54-
Following rules may conflicts `editorconfig` rule.
54+
Following rules may conflict `editorconfig/*` rule.
5555
It is recommended to disable them.
5656

5757
- eol-last

main.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,11 @@
22

33
module.exports = {
44
rules: {
5-
editorconfig: require("./lib/rules/editorconfig"),
5+
charset: require("./lib/rules/charset"),
6+
"eol-last": require("./lib/rules/eol-last"),
7+
indent: require("./lib/rules/indent"),
8+
"linebreak-style": require("./lib/rules/linebreak-style"),
9+
"no-trailing-spaces": require("./lib/rules/no-trailing-spaces"),
610
},
711
configs: {
812
noconflict: {

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
22
"name": "eslint-plugin-editorconfig",
3-
"version": "3.0.0",
3+
"version": "3.0.1",
44
"description": "An ESLint plugin to enforce EditorConfig rules",
55
"main": "main.js",
66
"scripts": {
7-
"test": "mocha --reporter dot tests/**/*",
7+
"test": "./tests/package/test.sh && mocha --reporter dot tests/**/*.js",
88
"lint": "eslint .",
99
"release": "npm publish . --access public"
1010
},

tests/package/.eslintrc.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
"use strict";
2+
3+
module.exports = {
4+
root: true,
5+
6+
env: {
7+
es6: true,
8+
node: true,
9+
},
10+
plugins: [ "editorconfig" ],
11+
rules: {
12+
"editorconfig/charset": "error",
13+
"editorconfig/eol-last": "error",
14+
"editorconfig/indent": "error",
15+
"editorconfig/linebreak-style": "error",
16+
"editorconfig/no-trailing-spaces": "error",
17+
},
18+
};

tests/package/main.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
"use strict";
2+
3+
const foo = 0;
4+
5+
console.log(foo);

tests/package/package.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"name": "@phanect/test-package",
3+
"version": "1.0.0",
4+
"description": "a test package",
5+
"author": "Jumpei Ogawa <phanective@gmail.com>",
6+
"license": "UNLICENSED",
7+
"private": true,
8+
"main": "main.js",
9+
"scripts": {
10+
"lint": "eslint .",
11+
"test": "npm run lint"
12+
},
13+
"dependencies": {
14+
"eslint-plugin-editorconfig": "file:../../eslint-plugin-editorconfig-3.0.0.tgz"
15+
}
16+
}

tests/package/test.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/usr/bin/env bash
2+
3+
set -eu
4+
5+
DIRNAME="$(dirname "${BASH_SOURCE[0]}")"
6+
7+
cd "${DIRNAME}/../../"
8+
PACKAGE="$(npm pack .)"
9+
10+
cd "${DIRNAME}"
11+
npm install "../../${PACKAGE}"
12+
13+
npm run lint

0 commit comments

Comments
 (0)