Skip to content

Commit

Permalink
Merge pull request #36 from phanect/fix-clienting-deprecation
Browse files Browse the repository at this point in the history
Fix errors caused by #34
  • Loading branch information
phanect committed Dec 18, 2020
2 parents 9a74246 + ff4cc08 commit 94f08c3
Show file tree
Hide file tree
Showing 9 changed files with 64 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
steps:
- init
- run: npm test
- run: npm run lint
# - run: npm run lint

release:
executor:
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,8 @@ yarn-error.log*
package-lock.json
yarn.lock

# tarball generated by npm pack
*.tgz

# Other tools
.eslintcache
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ Or you can extend `plugin:editorconfig/all` instead of adding rules.

## Conflicting ESLint rules

Following rules may conflicts `editorconfig` rule.
Following rules may conflict `editorconfig/*` rule.
It is recommended to disable them.

- eol-last
Expand Down
6 changes: 5 additions & 1 deletion main.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@

module.exports = {
rules: {
editorconfig: require("./lib/rules/editorconfig"),
charset: require("./lib/rules/charset"),
"eol-last": require("./lib/rules/eol-last"),
indent: require("./lib/rules/indent"),
"linebreak-style": require("./lib/rules/linebreak-style"),
"no-trailing-spaces": require("./lib/rules/no-trailing-spaces"),
},
configs: {
noconflict: {
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"name": "eslint-plugin-editorconfig",
"version": "3.0.0",
"version": "3.0.1",
"description": "An ESLint plugin to enforce EditorConfig rules",
"main": "main.js",
"scripts": {
"test": "mocha --reporter dot tests/**/*",
"test": "./tests/package/test.sh && mocha --reporter dot tests/**/*.js",
"lint": "eslint .",
"release": "npm publish . --access public"
},
Expand Down
18 changes: 18 additions & 0 deletions tests/package/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
"use strict";

module.exports = {
root: true,

env: {
es6: true,
node: true,
},
plugins: [ "editorconfig" ],
rules: {
"editorconfig/charset": "error",
"editorconfig/eol-last": "error",
"editorconfig/indent": "error",
"editorconfig/linebreak-style": "error",
"editorconfig/no-trailing-spaces": "error",
},
};
5 changes: 5 additions & 0 deletions tests/package/main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
"use strict";

const foo = 0;

console.log(foo);
16 changes: 16 additions & 0 deletions tests/package/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"name": "@phanect/test-package",
"version": "1.0.0",
"description": "a test package",
"author": "Jumpei Ogawa <phanective@gmail.com>",
"license": "UNLICENSED",
"private": true,
"main": "main.js",
"scripts": {
"lint": "eslint .",
"test": "npm run lint"
},
"dependencies": {
"eslint-plugin-editorconfig": "file:../../eslint-plugin-editorconfig-3.0.0.tgz"
}
}
13 changes: 13 additions & 0 deletions tests/package/test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/usr/bin/env bash

set -eu

DIRNAME="$(dirname "${BASH_SOURCE[0]}")"

cd "${DIRNAME}/../../"
PACKAGE="$(npm pack .)"

cd "${DIRNAME}"
npm install "../../${PACKAGE}"

npm run lint

0 comments on commit 94f08c3

Please sign in to comment.