Skip to content

Commit 94e5ee5

Browse files
author
Andrew Levine
committed
Initial Commit
0 parents  commit 94e5ee5

8 files changed

+243
-0
lines changed

.editorconfig

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
end_of_line = lf
6+
indent_size = 4
7+
indent_style = space
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true
10+
11+
[{package.json,*.yml}]
12+
indent_size = 2
13+
indent_style = space

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.DS_Store
2+
npm-debug.log
3+
node_modules

README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Magento ESLint Configuration
2+
3+
Shareable `ESLint` configuration used by all Magento PWA Studio projects.
4+
5+
## Goals
6+
7+
* Lint for possible errors and mistakes. No rules for stylistic preferences will be accepted
8+
9+
## Usage
10+
11+
```sh
12+
npm install @magento/eslint-config
13+
```
14+
15+
```js
16+
// in your ESLint configuration
17+
extends: ['@magento']
18+
```

circle.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
machine:
2+
node:
3+
version: 8
4+
5+
dependencies:
6+
pre:
7+
- echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc
8+
9+
deployment:
10+
npm:
11+
tag: /v[0-9]+(\.[0-9]+)*(-(alpha|beta))?/
12+
commands:
13+
- npm publish --access=public

index.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
const config = {
2+
plugins: ['jsx-a11y', 'react'],
3+
extends: ['plugin:jsx-a11y/recommended'],
4+
rules: {
5+
'no-unused-vars': [
6+
'error',
7+
{
8+
varsIgnorePattern: 'createElement'
9+
}
10+
],
11+
'react/jsx-uses-vars': 'error'
12+
}
13+
};
14+
15+
module.exports = config;

package-lock.json

Lines changed: 146 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"name": "@magento/eslint-config",
3+
"version": "1.0.0",
4+
"description": "Shared ESLint configuration for Magento PWA-related projects",
5+
"main": "index.js",
6+
"files": [
7+
"index.js"
8+
],
9+
"scripts": {
10+
"prettier": "prettier --write '*.js'",
11+
"prettier:check": "prettier-check '*.js'",
12+
"test": "npm run prettier:check"
13+
},
14+
"keywords": [
15+
"magento",
16+
"eslint"
17+
],
18+
"author": "Magento Commerce",
19+
"license": "(OSL-3.0 OR AFL-3.0)",
20+
"devDependencies": {
21+
"prettier": "^1.9.2",
22+
"prettier-check": "^2.0.0"
23+
},
24+
"peerDependencies": {
25+
"eslint-plugin-jsx-a11y": "^6.0.3",
26+
"eslint-plugin-react": "^7.5.1"
27+
}
28+
}

prettier.config.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
const config = {
2+
singleQuote: true,
3+
tabWidth: 4,
4+
trailingComma: 'none'
5+
};
6+
7+
module.exports = config;

0 commit comments

Comments
 (0)