Skip to content

Commit 250c3aa

Browse files
committed
Update package configs and add linting
1 parent 9385fe9 commit 250c3aa

File tree

6 files changed

+3044
-4
lines changed

6 files changed

+3044
-4
lines changed

.eslintrc.js

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
module.exports = {
2+
root: true,
3+
extends: "eslint:recommended",
4+
globals: {
5+
wp: true,
6+
},
7+
env: {
8+
node: true,
9+
es6: true,
10+
amd: true,
11+
browser: true,
12+
jquery: true,
13+
},
14+
parserOptions: {
15+
ecmaFeatures: {
16+
globalReturn: true,
17+
generators: false,
18+
objectLiteralDuplicateProperties: false,
19+
},
20+
ecmaVersion: 2017,
21+
sourceType: "module",
22+
},
23+
plugins: ["import"],
24+
settings: {
25+
"import/core-modules": [],
26+
"import/ignore": [
27+
"node_modules",
28+
"\\.(coffee|scss|css|less|hbs|svg|json)$",
29+
],
30+
},
31+
rules: {
32+
"no-console": 0,
33+
quotes: ["error", "single"],
34+
"comma-dangle": [
35+
"error",
36+
{
37+
arrays: "always-multiline",
38+
objects: "always-multiline",
39+
imports: "always-multiline",
40+
exports: "always-multiline",
41+
functions: "ignore",
42+
},
43+
],
44+
},
45+
};

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
vendor
2+
node_modules

.stylelintrc.js

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
module.exports = {
2+
extends: "stylelint-config-standard",
3+
rules: {
4+
"no-empty-source": null,
5+
"string-quotes": "double",
6+
"at-rule-no-unknown": [
7+
true,
8+
{
9+
ignoreAtRules: [
10+
"extend",
11+
"at-root",
12+
"debug",
13+
"warn",
14+
"error",
15+
"if",
16+
"else",
17+
"for",
18+
"each",
19+
"while",
20+
"mixin",
21+
"include",
22+
"content",
23+
"return",
24+
"function",
25+
"tailwind",
26+
"apply",
27+
"responsive",
28+
"variants",
29+
"screen",
30+
],
31+
},
32+
],
33+
},
34+
};

composer.json

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "mmirus/gravity-forms-data-attributes",
3-
"description": "Display the content of a field in the title bar of your Advanced Custom Fields flexible content sections.",
3+
"description": "Add custom data attributes to Gravity Forms fields.",
44
"type": "wordpress-plugin",
55
"license": "MIT",
66
"homepage": "https://github.com/mmirus/gravity-forms-data-attributes",
@@ -13,14 +13,13 @@
1313
],
1414
"keywords": [
1515
"wordpress",
16-
"advanced custom fields",
17-
"acf"
16+
"gravity forms"
1817
],
1918
"support": {
2019
"issues": "https://github.com/mmirus/gravity-forms-data-attributes/issues"
2120
},
2221
"require": {
23-
"php": ">=5.3.0",
22+
"php": ">=7.1.0",
2423
"composer/installers": "^1.6"
2524
}
2625
}

package.json

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"name": "gravity-forms-data-attributes",
3+
"version": "1.0.0",
4+
"description": "Add custom data attributes to Gravity Forms fields.",
5+
"private": true,
6+
"repository": "git@github.com:mmirus/gravity-forms-data-attributes.git",
7+
"author": "Matt Mirus <matt@mattmirus.com>",
8+
"homepage": "https://github.com/mmirus/gravity-forms-data-attributes",
9+
"license": "MIT",
10+
"scripts": {
11+
"lint": "npm run -s lint:scripts && npm run -s lint:styles",
12+
"lint:scripts": "eslint assets",
13+
"lint:styles": "stylelint \"assets/*.css\"",
14+
"test": "npm run -s lint"
15+
},
16+
"devDependencies": {
17+
"eslint": "^5.9.0",
18+
"eslint-plugin-import": "^2.14.0",
19+
"stylelint": "^9.9.0",
20+
"stylelint-config-standard": "^18.2.0"
21+
}
22+
}

0 commit comments

Comments
 (0)