Skip to content

Commit

Permalink
chore: add eslint config to getting-started
Browse files Browse the repository at this point in the history
  • Loading branch information
alisabzevari committed Jun 26, 2021
1 parent ed8c1ab commit 0d15406
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 0 deletions.
17 changes: 17 additions & 0 deletions getting-started/.eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"env": {
"node": true
},
"extends": "airbnb-base",
"parserOptions": {
"sourceType": "module"
},
"rules": {
"strict": ["error", "global"],
"no-use-before-define": ["error", "nofunc"],
"no-console": "off",
"import/no-unresolved": "off",
"no-unused-vars": ["error", { "argsIgnorePattern": "^_" }]
},
"ignorePatterns": "**/*_pb.js"
}
16 changes: 16 additions & 0 deletions getting-started/ts-example/.eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"plugins": ["@typescript-eslint", "node"],
"extends": ["eslint:recommended", "plugin:@typescript-eslint/recommended"],
"parser": "@typescript-eslint/parser",
"rules": {
"@typescript-eslint/no-var-requires": 0,
"import/prefer-default-export": "off",
"import/extensions": [
"error",
"ignorePackages",
{
"": "never"
}
]
}
}
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@
"lint:fix": "lerna run lint:fix",
"lint:fix:changed": "lerna run --concurrency 1 --stream lint:fix --since HEAD --exclude-dependents",
"lint:examples": "eslint ./examples/**/*.js",
"lint:getting-started": "eslint ./getting-started/**/*.{js,ts}",
"lint:getting-started:fix": "eslint ./getting-started/**/*.{js,ts} --fix",
"lint:examples:fix": "eslint ./examples/**/*.js --fix",
"lint:markdown": "./node_modules/.bin/markdownlint $(git ls-files '*.md') -i ./CHANGELOG.md",
"lint:markdown:fix": "./node_modules/.bin/markdownlint $(git ls-files '*.md') -i ./CHANGELOG.md --fix",
Expand Down

0 comments on commit 0d15406

Please sign in to comment.