Skip to content

Commit

Permalink
Merge pull request #889 from mstruebing/task/editorconfigLinting
Browse files Browse the repository at this point in the history
TASK: Add editorconfig linter
  • Loading branch information
skurfuerst authored Sep 6, 2017
2 parents a3118c1 + 19c540f commit 5e5559e
Show file tree
Hide file tree
Showing 31 changed files with 64 additions and 21 deletions.
4 changes: 2 additions & 2 deletions Build/Jenkins/release-neos-ui.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ cd $DIR/../../

# download JQ if we don't have it yet, for manipulating composer.json
if [ ! -f "jq-linux64" ]; then
wget https://github.com/stedolan/jq/releases/download/jq-1.5/jq-linux64
chmod +x jq-linux64
wget https://github.com/stedolan/jq/releases/download/jq-1.5/jq-linux64
chmod +x jq-linux64
fi


Expand Down
10 changes: 5 additions & 5 deletions Build/Jenkins/update-neos-ui-compiled.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@ git add Resources/Public/
git commit -m "Compile Neos UI - $GIT_SHA1" || true

if [ "$GIT_BRANCH" == "origin/master" ]; then
echo "Git branch $GIT_BRANCH found, pushing to this branch."
git push origin HEAD:${GIT_BRANCH#*/}
echo "Git branch $GIT_BRANCH found, pushing to this branch."
git push origin HEAD:${GIT_BRANCH#*/}
fi

if [ "$GIT_TAG" != "" ]; then
echo "Git tag $GIT_TAG found; also tagging the UI-compiled package."
git tag -a -m "$GIT_TAG" $GIT_TAG
git push origin $GIT_TAG
echo "Git tag $GIT_TAG found; also tagging the UI-compiled package."
git tag -a -m "$GIT_TAG" $GIT_TAG
git push origin $GIT_TAG
fi
2 changes: 1 addition & 1 deletion Build/TravisCi/Scripts/CodeStyle.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ set -e
# This file serves as the script for the TravisCI `CodeStyle` TEST_SUITE environment.
# The script will be executed in the package working directory.
#
yarn lint
yarn lint && yarn lint:editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,4 @@ protected function computeStateInternally(&$adjustedState, $context)
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -80,4 +80,4 @@ protected function build(array $resourceArrayToSort, \Closure $builderForLine)

return $result;
}
}
}
2 changes: 1 addition & 1 deletion Classes/Neos/Neos/Ui/Fusion/Helper/ModulesHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public function isEnabled($modulePath)
if (isset($moduleConfiguration['enabled']) && $moduleConfiguration['enabled'] !== true) {
return false;
}

array_pop($modulePathSegments);

if ($modulePathSegments === []) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ protected function convertChangeData($changeData)

if (!isset($this->typeMap[$type])) {
return new \Neos\Error\Messages\Error(
sprintf('Could not convert change type %s, it is unknown to the system', $type));
sprintf('Could not convert change type %s, it is unknown to the system', $type));
}

$changeClass = $this->typeMap[$type];
Expand Down
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,14 @@
"coverage:publish": "lerna run coverage:publish --concurrency 1",
"test": "lerna run test --concurrency 1",
"test:e2e": "yarn run testcafe chrome:headless Tests/IntegrationTests/*",
"lint": "lerna run lint --concurrency 1"
"lint": "lerna run lint --concurrency 1",
"lint:editorconfig": "editorconfig-checker --exclude 'packages\/|Resources\/|LICENSE|README' && lerna run lint:editorconfig --concurrency 1"
},
"devDependencies": {
"@neos-project/build-essentials": "*",
"@inkdpixels/commit-analyzer": "^1.0.0",
"@inkdpixels/release-notes-generator": "^1.0.0",
"@neos-project/brand": "^1.1.0",
"@neos-project/build-essentials": "*",
"@neos-project/eslint-config-neos": "^1.1.1",
"babel-cli": "^6.8.0",
"babel-core": "^6.13.2",
Expand All @@ -39,6 +40,7 @@
"cpx": "^1.3.1",
"cross-env": "^3.0.0",
"css-loader": "^0.28.4",
"editorconfig-checker": "^1.0.2",
"enzyme": "^2.8.2",
"eslint": "^3.1.1",
"extract-text-webpack-plugin": "^1.0.1",
Expand Down
5 changes: 4 additions & 1 deletion packages/build-essentials/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"cpx": "./node_modules/.bin/cpx",
"codeclimate-test-reporter": "./node_modules/.bin/codeclimate-test-reporter",
"cross-env": "./node_modules/.bin/cross-env",
"editorconfig-checker": "./node_modules/.bin/editorconfig-checker",
"eslint": "./node_modules/.bin/eslint",
"greenkeeper-postpublish": "./node_modules/.bin/greenkeeper-postpublish",
"jest": "./node_modules/.bin/jest",
Expand All @@ -19,7 +20,8 @@
"stylelint": "./node_modules/.bin/stylelint"
},
"scripts": {
"lint": "eslint src"
"lint": "eslint src",
"lint:editorconfig": "editorconfig-checker"
},
"dependencies": {
"@neos-project/brand": "^1.1.0",
Expand All @@ -38,6 +40,7 @@
"codeclimate-test-reporter": "^0.4.0",
"cpx": "^1.3.1",
"cross-env": "^3.0.0",
"editorconfig-checker": "^1.0.2",
"eslint": "^3.1.1",
"extract-text-webpack-plugin": "^1.0.1",
"greenkeeper-postpublish": "^1.0.0",
Expand Down
1 change: 1 addition & 0 deletions packages/neos-ui-backend-connector/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"build:watch": "exit 0",
"clean": "rimraf ./lib ./dist",
"lint": "eslint src",
"lint:editorconfig": "editorconfig-checker",
"jest": "PWD=$(pwd) NODE_ENV=test jest -w 1 --coverage"
},
"devDependencies": {
Expand Down
1 change: 1 addition & 0 deletions packages/neos-ui-ckeditor-bindings/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"build:watch": "yarn build -- --watch",
"clean": "rimraf ./lib ./dist",
"lint": "eslint src",
"lint:editorconfig": "editorconfig-checker",
"jest": "PWD=$(pwd) NODE_ENV=test jest -w 1 --coverage"
},
"devDependencies": {
Expand Down
1 change: 1 addition & 0 deletions packages/neos-ui-containers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"build": "exit 0",
"build:watch": "exit 0",
"lint": "eslint src",
"lint:editorconfig": "editorconfig-checker",
"jest": "PWD=$(pwd) NODE_ENV=test jest -w 1 --coverage"
},
"devDependencies": {
Expand Down
1 change: 1 addition & 0 deletions packages/neos-ui-contentrepository/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"build:watch": "exit 0",
"clean": "rimraf ./lib ./dist",
"lint": "eslint src",
"lint:editorconfig": "editorconfig-checker",
"jest": "PWD=$(pwd) NODE_ENV=test jest -w 1 --coverage"
},
"devDependencies": {
Expand Down
1 change: 1 addition & 0 deletions packages/neos-ui-decorators/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"build:watch": "exit 0",
"clean": "rimraf ./lib ./dist",
"lint": "eslint src",
"lint:editorconfig": "editorconfig-checker",
"jest": "PWD=$(pwd) NODE_ENV=test jest -w 1 --coverage"
},
"devDependencies": {
Expand Down
1 change: 1 addition & 0 deletions packages/neos-ui-editors/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"build:watch": "yarn build -- --watch",
"clean": "rimraf ./lib ./dist",
"lint": "eslint src && stylelint 'src/**/*.css'",
"lint:editorconfig": "editorconfig-checker",
"jest": "PWD=$(pwd) NODE_ENV=test jest -w 1 --coverage",
"postpublish": "greenkeeper-postpublish"
},
Expand Down
1 change: 1 addition & 0 deletions packages/neos-ui-extensibility/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"build:watch": "exit 0",
"clean": "rimraf ./lib ./dist",
"lint": "eslint src",
"lint:editorconfig": "editorconfig-checker",
"jest": "PWD=$(pwd) NODE_ENV=test jest -w 1 --coverage"
},
"dependencies": {
Expand Down
1 change: 1 addition & 0 deletions packages/neos-ui-guest-frame/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"build:watch": "npm run build -- --watch",
"clean": "rimraf ./lib ./dist",
"lint": "eslint src",
"lint:editorconfig": "editorconfig-checker",
"jest": "PWD=$(pwd) NODE_ENV=test jest -w 1 --coverage"
},
"devDependencies": {
Expand Down
1 change: 1 addition & 0 deletions packages/neos-ui-i18n/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"build:watch": "exit 0",
"clean": "rimraf ./lib ./dist",
"lint": "eslint src",
"lint:editorconfig": "editorconfig-checker",
"jest": "PWD=$(pwd) NODE_ENV=test jest -w 1 --coverage"
},
"devDependencies": {
Expand Down
1 change: 1 addition & 0 deletions packages/neos-ui-inspector/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"build:watch": "exit 0",
"clean": "rimraf ./lib ./dist",
"lint": "eslint src",
"lint:editorconfig": "editorconfig-checker",
"jest": "PWD=$(pwd) NODE_ENV=test jest -w 1 --coverage"
},
"devDependencies": {
Expand Down
1 change: 1 addition & 0 deletions packages/neos-ui-redux-store/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"build:watch": "exit 0",
"clean": "rimraf ./lib ./dist",
"lint": "eslint src",
"lint:editorconfig": "editorconfig-checker",
"jest": "PWD=$(pwd) NODE_ENV=test jest -w 1 --coverage"
},
"devDependencies": {
Expand Down
1 change: 1 addition & 0 deletions packages/neos-ui-validators/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"test": "yarn jest",
"test:watch": "yarn jest -- --watch",
"lint": "eslint src",
"lint:editorconfig": "editorconfig-checker",
"clean": "rimraf ./lib ./dist",
"jest": "PWD=$(pwd) NODE_ENV=test jest -w 1 --coverage"
},
Expand Down
1 change: 1 addition & 0 deletions packages/neos-ui-views/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"test:watch": "yarn jest -- --watch",
"clean": "rimraf ./lib ./dist",
"lint": "eslint src && stylelint 'src/**/*.css'",
"lint:editorconfig": "editorconfig-checker",
"jest": "PWD=$(pwd) NODE_ENV=test jest -w 1 --coverage",
"postpublish": "greenkeeper-postpublish"
},
Expand Down
1 change: 1 addition & 0 deletions packages/neos-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"build:watch": "yarn build -- --watch",
"clean": "rimraf ./lib ./dist",
"lint": "eslint src && stylelint 'src/**/*.css'",
"lint:editorconfig": "editorconfig-checker",
"jest": "PWD=$(pwd) NODE_ENV=test jest -w 1 --coverage"
},
"devDependencies": {
Expand Down
1 change: 1 addition & 0 deletions packages/react-proptypes/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"build:watch": "exit 0",
"clean": "rimraf ./lib ./dist",
"lint": "eslint src",
"lint:editorconfig": "editorconfig-checker",
"jest": "PWD=$(pwd) NODE_ENV=test jest -w 1 --coverage"
},
"devDependencies": {
Expand Down
10 changes: 5 additions & 5 deletions packages/react-ui-components/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,9 @@ After the installation succeeded, execute `yarn start` to start the
Make a symbolic link inside your Neos installation to your cloned sources od this package. The following example assumes that both installations are in the same folder.

```
cd YourNeosUiInstanz/Packages/Application/Neos.Neos.Ui/node_modules/@neos-project
rm -rf react-ui-components
ln -s ./../../../../../../react-ui-components/ .
cd YourNeosUiInstanz/Packages/Application/Neos.Neos.Ui/node_modules/@neos-project
rm -rf react-ui-components
ln -s ./../../../../../../react-ui-components/ .
```


Expand All @@ -80,8 +80,8 @@ yarn watch:build
run the watcher inside the Neos.Neos.Ui Package

```
cd YourNeosUiInstanz/Packages/Application/Neos.Neos.Ui
yarn watch:build
cd YourNeosUiInstanz/Packages/Application/Neos.Neos.Ui
yarn watch:build
```

#### Commit Guidelines
Expand Down
1 change: 1 addition & 0 deletions packages/react-ui-components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"css": "cpx './src/**/*.css' ./lib && cpx './src/**/*.woff' ./lib && cpx './src/**/*.woff2' ./lib",
"clean": "rimraf ./lib ./dist",
"lint": "eslint src && stylelint 'src/**/*.css'",
"lint:editorconfig": "editorconfig-checker --exclude 'LICENSE|\/fontAwesome\/'",
"jest": "jest src/**/*.spec.js -w 1 --coverage",
"start": "cross-env STORY=true start-storybook -p 9001",
"postpublish": "greenkeeper-postpublish",
Expand Down
2 changes: 1 addition & 1 deletion packages/react-ui-components/src/Dialog/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
border: 1px solid var(--brandColorsContrastDark);

.dialog--wide & {
max-width: calc(var(--goldenUnit) * 24);
max-width: calc(var(--goldenUnit) * 24);
}
}
.dialog__title {
Expand Down
1 change: 1 addition & 0 deletions packages/utils-helpers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"build:watch": "exit 0",
"clean": "rimraf ./lib ./dist",
"lint": "eslint src",
"lint:editorconfig": "editorconfig-checker",
"jest": "PWD=$(pwd) NODE_ENV=test jest -w 1 --coverage"
},
"devDependencies": {
Expand Down
1 change: 1 addition & 0 deletions packages/utils-logger/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"build:watch": "exit 0",
"clean": "rimraf ./lib ./dist",
"lint": "eslint src",
"lint:editorconfig": "editorconfig-checker",
"jest": "PWD=$(pwd) NODE_ENV=test jest -w 1 --coverage"
},
"devDependencies": {
Expand Down
1 change: 1 addition & 0 deletions packages/utils-redux/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"build:watch": "exit 0",
"clean": "rimraf ./lib ./dist",
"lint": "eslint src",
"lint:editorconfig": "editorconfig-checker",
"jest": "PWD=$(pwd) NODE_ENV=test jest -w 1 --coverage"
},
"devDependencies": {
Expand Down
19 changes: 19 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2659,6 +2659,15 @@ ecc-jsbn@~0.1.1:
dependencies:
jsbn "~0.1.0"

editorconfig-checker@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/editorconfig-checker/-/editorconfig-checker-1.0.2.tgz#a1a0d0dd1f6e4d51fd27f485d73549b89c54b8b1"
dependencies:
iniparser "^1.0.5"
minimatch "^3.0.4"
minimist "^1.2.0"
node-find-files "^0.0.4"

ee-first@1.1.1:
version "1.1.1"
resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d"
Expand Down Expand Up @@ -3942,6 +3951,10 @@ ini@^1.2.0, ini@^1.3.2, ini@^1.3.4, ini@~1.3.0:
version "1.3.4"
resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.4.tgz#0537cb79daf59b59a1a517dff706c86ec039162e"

iniparser@^1.0.5:
version "1.0.5"
resolved "https://registry.yarnpkg.com/iniparser/-/iniparser-1.0.5.tgz#836d6befe6dfbfcee0bccf1cf9f2acc7027f783d"

inquirer@^0.12.0:
version "0.12.0"
resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-0.12.0.tgz#1ef2bfd63504df0bc75785fff8c2c41df12f077e"
Expand Down Expand Up @@ -5467,6 +5480,12 @@ node-fetch@^1.0.1:
encoding "^0.1.11"
is-stream "^1.0.1"

node-find-files@^0.0.4:
version "0.0.4"
resolved "https://registry.yarnpkg.com/node-find-files/-/node-find-files-0.0.4.tgz#e4b62c7f83a992627260d56f072115c618a87059"
dependencies:
async "0.2.6"

node-int64@^0.4.0:
version "0.4.0"
resolved "https://registry.yarnpkg.com/node-int64/-/node-int64-0.4.0.tgz#87a9065cdb355d3182d8f94ce11188b825c68a3b"
Expand Down

0 comments on commit 5e5559e

Please sign in to comment.