Skip to content
This repository has been archived by the owner on Feb 28, 2022. It is now read-only.

Commit

Permalink
chore(lint): use helix-eslint-config and update deps
Browse files Browse the repository at this point in the history
- @adobe/eslint-config-helix: 1.0.0
- @pollyjs/adapter-fetch: 2.6.2
- @pollyjs/adapter-node-http: 2.6.2
- @pollyjs/core: 2.6.2
- @pollyjs/persister-fs: 2.6.2
- eslint: 6.1.0
- eslint-plugin-import: 2.18.2
- lint-staged: 9.2.1
- mocha: 6.2.0
- lodash: 4.17.15
- remark-parse: 7.0.1
- snyk: 1.216.0
- strip-markdown: 3.1.0
- unist-util-find-all-between: 1.0.6
  • Loading branch information
tripodsan committed Aug 13, 2019
1 parent deb7dc6 commit 65e50a3
Show file tree
Hide file tree
Showing 31 changed files with 851 additions and 865 deletions.
45 changes: 3 additions & 42 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,56 +11,17 @@
*/

module.exports = {
'env': {
'node': true,
'es6': true
},
// this is the root project for all sub modules. stop searching for any
// eslintrc files in parent directories.
'root': true,
'parserOptions': {
'sourceType': 'script',
// async/await support
'ecmaVersion': 2018,
},
'plugins': [
'header',
],
'extends': 'airbnb',
'rules': {
'strict': 0,

root: true,
extends: '@adobe/helix',
rules: {
// Allow while (true) infinite loops
'no-constant-condition': ["error", { "checkLoops": false }],

// Forbid multiple statements in one line
'max-statements-per-line': ["error", { "max": 1 }],

// Allow for-of loops
'no-restricted-syntax': ['error', 'ForInStatement', 'LabeledStatement', 'WithStatement'],

// Allow return before else & redundant else statements
'no-else-return': 'off',

// Quite useful to mark values as unused
'no-underscore-dangle': 'off',

// We have quite a lot of use cases where assignment to function
// parameters is definitely desirable
'no-param-reassign': 'off',

// enforce license header
'header/header': [2, 'block', ['',
{ pattern: ' * Copyright \\d{4} Adobe\\. All rights reserved\\.', template: ' * Copyright 2019 Adobe. All rights reserved.'},
' * This file is licensed to you under the Apache License, Version 2.0 (the "License");',
' * you may not use this file except in compliance with the License. You may obtain a copy',
' * of the License at http://www.apache.org/licenses/LICENSE-2.0',
' *',
' * Unless required by applicable law or agreed to in writing, software distributed under',
' * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS',
' * OF ANY KIND, either express or implied. See the License for the specific language',
' * governing permissions and limitations under the License.',
' ',
]]
}
};
4 changes: 2 additions & 2 deletions bin/schema2ts.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,5 +52,5 @@ const options = {
*/`,
};

compileFromFile('docs/context.schema.json', options).then(ts => writeFileSync('src/context.d.ts', ts));
compileFromFile('docs/action.schema.json', options).then(ts => writeFileSync('src/action.d.ts', ts));
compileFromFile('docs/context.schema.json', options).then((ts) => writeFileSync('src/context.d.ts', ts));
compileFromFile('docs/action.schema.json', options).then((ts) => writeFileSync('src/action.d.ts', ts));
Loading

0 comments on commit 65e50a3

Please sign in to comment.