File tree Expand file tree Collapse file tree 1 file changed +3
-25
lines changed Expand file tree Collapse file tree 1 file changed +3
-25
lines changed Original file line number Diff line number Diff line change @@ -6,13 +6,11 @@ based on Magento 2 coding standards but tuned to be less annoying!
6
6
7
7
## Usage
8
8
9
- After pulling and installing/updating project locally composer hook should install linters automatically.
10
- It will add precommit git hook, so on each commit linters will run for the files added to commit.
11
-
12
- If that does not happen run following command to update local git hooks and install npm packages:
9
+ After pulling and installing/updating project locally run following command to update local git hooks and install npm packages:
13
10
``` shell
14
11
make linters-init
15
12
```
13
+ It will add precommit git hook, so on each commit linters will run for the files added to commit.
16
14
17
15
### Git Pre-Commit
18
16
A commit will fail if linters found errors in your code, check the '_ console_ ' tab in 'Git' section of the PhpStorm
@@ -104,27 +102,7 @@ precommit: # analyses code staged for commit
104
102
Replace the sample `a000z999` commit hash with the hash from the project where you want to start linting from.
105
103
Files modified after the starting commit hash will be linted during project build and will fail the build on linter violations.
106
104
107
- # ### 3. Add post update/install composer hooks:
108
-
109
- composer.json
110
- ```json
111
- {
112
- ...
113
- "scripts" : {
114
- "post-update-cmd" : [
115
- ...
116
- "make linters-init"
117
- ],
118
- "post-install-cmd" : [
119
- ...
120
- "make linters-init"
121
- ]
122
- }
123
- ...
124
- }
125
- ```
126
-
127
- #### 4. Commit to project`s repo.
105
+ # ### 3. Commit to project`s repo.
128
106
Commit updated composer files, vendor folder, code-quality config files from the root and 'makefile' changes
129
107
130
108
# ## Installation on any other Magento 2 project:
You can’t perform that action at this time.
0 commit comments