Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
simonbrent committed Mar 8, 2022
2 parents 42897bf + dd69e3c commit 0cfe6ce
Show file tree
Hide file tree
Showing 169 changed files with 14,181 additions and 13,621 deletions.
255 changes: 93 additions & 162 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,105 +9,109 @@ const noRestrictedProperies = require('eslint-config-airbnb-base/rules/best-prac
module.exports = {
env: {
browser : true,
jquery : true
es6 : true,
node : true,
},
extends : [
plugins: [
'align-assignments',
],
extends: [
'airbnb-base',
],
parser : '@babel/eslint-parser',
parserOptions : {
requireConfigFile : false,
ecmaVersion : 8,
sourceType : 'module',
},
globals: {
Base : true,
Genoverse : true,
RTree : true,
dallianceLib : true,
VCFReader : true,
BWReader : true
Genoverse: true,
},
ignorePatterns: [
'.eslintrc.js',
'node_modules',
'index.js',
'dist',
'**/*.min.js',
'js/lib/**/*.js'
'src/js/lib/dalliance/*.js',
'src/js/lib/jquery-plugins/*.js',
],
rules: {
'align-assignments/align-assignments' : [ 'error', { requiresOnly: false }],
'padding-line-between-statements' : [
'error', ...[
[ '*', [ 'multiline-block-like', 'return', 'break', 'export', 'throw', 'cjs-export' ]],
[ '*', [ 'cjs-import', 'import', 'const', 'let', 'var' ]],
[[ 'multiline-block-like', 'return', 'break', 'export', 'throw', 'cjs-export' ], '*' ],
[[ 'cjs-import', 'import', 'const', 'let', 'var' ], '*' ],
[ 'cjs-import', 'cjs-import', 'any' ],
[ 'import', 'import', 'any' ],
[ 'singleline-const', 'const', 'any' ],
[ 'singleline-let', 'let', 'any' ],
[ 'singleline-var', 'var', 'any' ],
[ 'expression', 'expression', 'any' ],
].map(
([ prev, next = '*', blankLine = 'always' ]) => ({ prev, next, blankLine })
),
],
'max-len' : 'off',
'no-multi-spaces' : 'off',
'no-multi-assign' : 'off',
'no-nested-ternary' : 'off',
'no-prototype-builtins' : 'off',
'no-plusplus' : 'off',
'operator-linebreak' : 'off',
'prefer-destructuring' : 'off',
'quote-props' : 'off',
'template-curly-spacing' : 'off',
'yoda' : 'off',
'no-underscore-dangle' : 'off',
'newline-per-chained-call' : 'off',
'default-param-last' : 'off',
'no-promise-executor-return' : 'off',
'no-continue' : 'off',
'no-fallthrough' : 'off',
'no-bitwise' : 'off',
'func-names' : 'off',
'no-param-reassign' : 'off',

'array-bracket-spacing' : [ 'warn', 'always', { objectsInArrays: false, arraysInArrays: false }],
'quotes' : [ 'warn', 'single', { avoidEscape: true }],

'arrow-parens' : [ 'error', 'as-needed', { requireForBlockBody: true }],
'function-paren-newline' : [ 'error', 'consistent' ],
'function-call-argument-newline' : [ 'error', 'consistent' ],
'linebreak-style' : [ 'error', 'unix' ],
'object-shorthand' : [ 'error', 'consistent' ],

'comma-dangle': [ 'error', {
arrays : 'always-multiline',
objects : 'always-multiline',
imports : 'always-multiline',
exports : 'always-multiline',
functions : 'never',
}],
'key-spacing': [ 'error', {
singleLine : { beforeColon: false, afterColon: true },
multiLine : { beforeColon: false, afterColon: true },
align : { beforeColon: true, afterColon: true, on: 'colon' },
}],
'object-curly-newline': [ 'error', {
ObjectExpression : { multiline: true, consistent: true },
ObjectPattern : { multiline: true, consistent: true },
}],
'import/no-extraneous-dependencies' : [ 'error' ],
'import/order' : [ 'error', {
alphabetize : { order: 'asc' },
groups : [ 'builtin', 'external', 'internal', 'parent', 'sibling' ],
}],

'no-restricted-globals' : [ 'error', 'event', 'isFinite' ],
'no-restricted-properties' : noRestrictedProperies,

'consistent-return': 'off', // FIXME: async functions and $.events
},
overrides: [
{
files : [ 'js/**/*.js' ],
plugins : [ 'es' ],
extends : [
'airbnb-base',
'plugin:es/no-new-in-es2018',
'plugin:es/no-new-in-es2017',
'plugin:es/no-new-in-es2016',
'plugin:es/no-new-in-es2015'
],
parserOptions: {
parser : 'espree',
ecmaVersion : 5,
sourceType : 'script'
},
rules: {
'linebreak-style' : [ 'error', 'unix' ],
'comma-dangle' : [ 'error', 'never' ],
'quotes' : [ 'warn', 'single', { avoidEscape: true }], // be more permissive than airbnb - allow 'double quotes containing 'singles''
'object-shorthand' : [ 'error', 'never' ],
'array-bracket-spacing' : [ 'warn', 'always', {
objectsInArrays : false,
arraysInArrays : false
}],
'object-curly-newline': [ 'error', {
ObjectExpression : { multiline: true, consistent: true },
ObjectPattern : { multiline: true, consistent: true }
}],
'key-spacing': [ 'error', {
singleLine : { beforeColon: false, afterColon: true },
multiLine : { beforeColon: false, afterColon: true },
align : { beforeColon: true, afterColon: true, on: 'colon' },
}],
'quote-props' : 'off',
'no-multi-spaces' : 'off',
'prefer-destructuring' : 'off',
'no-prototype-builtins' : 'off',
'no-nested-ternary' : 'off',
'no-plusplus' : 'off',
'template-curly-spacing' : 'off',
'no-var' : 'off',
'one-var' : 'off',
'one-var-declaration-per-line' : 'off',
'vars-on-top' : 'off',
'func-names' : 'off',
'prefer-arrow-callback' : 'off',
'prefer-spread' : 'off',
'prefer-template' : 'off',
'prefer-rest-params' : 'off',
'no-param-reassign' : 'off',
'no-multi-assign' : 'off',
'no-underscore-dangle' : 'off',
'no-empty' : 'off',
'switch-colon-spacing' : 'off',
'max-len' : 'off',
'no-continue' : 'off',
'consistent-return' : 'off',
'operator-linebreak' : 'off',
'guard-for-in' : 'off',
'no-restricted-syntax' : 'off',
'no-restricted-globals' : 'off',
'function-paren-newline' : 'off',
'no-fallthrough' : 'off',
'no-bitwise' : 'off',
'no-cond-assign' : 'off',
'no-new' : 'off',
'newline-per-chained-call' : 'off',
'prefer-exponentiation-operator' : 'off',
'no-restricted-properties' : noRestrictedProperies
}
},
{
files : [ '**/*.js' ],
excludedFiles: 'js/**/*.js',
env : {
es6: true,
},
plugins : [ 'align-assignments' ],
files : [ 'test/**/*.js' ],
globals : {
jest : true,
describe : true,
Expand All @@ -119,79 +123,6 @@ module.exports = {
afterEach : true,
beforeEach : true,
},
rules: {
'align-assignments/align-assignments' : [ 'error', { requiresOnly: false }],
'padding-line-between-statements' : [
'error', ...[
[ '*', [ 'multiline-block-like', 'return', 'break', 'export', 'throw', 'cjs-export' ]],
[ '*', [ 'cjs-import', 'import', 'const', 'let', 'var' ]],
[[ 'multiline-block-like', 'return', 'break', 'export', 'throw', 'cjs-export' ], '*' ],
[[ 'cjs-import', 'import', 'const', 'let', 'var' ], '*' ],
[ 'cjs-import', 'cjs-import', 'any' ],
[ 'import', 'import', 'any' ],
[ 'singleline-const', 'const', 'any' ],
[ 'singleline-let', 'let', 'any' ],
[ 'singleline-var', 'var', 'any' ],
[ 'expression', 'expression', 'any' ],
].map(
([ prev, next = '*', blankLine = 'always' ]) => ({ prev, next, blankLine })
),
],
'max-len' : 'off',
'no-multi-spaces' : 'off',
'no-multi-assign' : 'off',
'no-nested-ternary' : 'off',
'no-prototype-builtins' : 'off',
'no-plusplus' : 'off',
'operator-linebreak' : 'off',
'prefer-destructuring' : 'off',
'quote-props' : 'off',
'template-curly-spacing' : 'off',
'yoda' : 'off',
'no-underscore-dangle' : 'off',
'newline-per-chained-call' : 'off',
'default-param-last' : 'off',
'no-promise-executor-return' : 'off',
'no-continue' : 'off',
'no-fallthrough' : 'off',
'no-bitwise' : 'off',
'func-names' : 'off',
'no-param-reassign' : 'off',

'array-bracket-spacing' : [ 'warn', 'always', { objectsInArrays: false, arraysInArrays: false }],
'quotes' : [ 'warn', 'single', { avoidEscape: true }],

'arrow-parens' : [ 'error', 'as-needed', { requireForBlockBody: true }],
'function-paren-newline' : [ 'error', 'consistent' ],
'function-call-argument-newline' : [ 'error', 'consistent' ],
'linebreak-style' : [ 'error', 'unix' ],
'object-shorthand' : [ 'error', 'consistent' ],

'comma-dangle': [ 'error', {
arrays : 'always-multiline',
objects : 'always-multiline',
imports : 'always-multiline',
exports : 'always-multiline',
functions : 'never',
}],
'key-spacing': [ 'error', {
singleLine : { beforeColon: false, afterColon: true },
multiLine : { beforeColon: false, afterColon: true },
align : { beforeColon: true, afterColon: true, on: 'colon' },
}],
'object-curly-newline': [ 'error', {
ObjectExpression : { multiline: true, consistent: true },
ObjectPattern : { multiline: true, consistent: true },
}],
'import/no-extraneous-dependencies' : [ 'error' ],
'import/order' : [ 'error', {
alphabetize : { order: 'asc' },
groups : [ 'builtin', 'external', 'internal', 'parent', 'sibling' ],
}],

'no-restricted-globals' : [ 'error', 'event', 'isFinite' ],
'no-restricted-properties' : noRestrictedProperies,
}
},
]
],
};
19 changes: 9 additions & 10 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,21 @@ name: test
on:
push:
branches:
- gh-pages
- master
- develop
jobs:
test:

runs-on: ubuntu-latest

strategy:
matrix:
node-version: [14.x]
node-version: [16.x]

steps:
- uses: actions/checkout@v2
- name: npm install and test
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: npm install
- run: npm test
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: yarn install
- run: yarn lint
- run: yarn test
33 changes: 33 additions & 0 deletions .github/workflows/update-gh-pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: update gh-pages

on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [16.x]

steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: yarn install
- run: yarn build --env public-path=/Genoverse/dist/
- name: Commit and push files
run: |
echo $GITHUB_ACTOR
git config --local user.email "[email protected]"
git config --local user.name $GITHUB_ACTOR
git fetch --all
git checkout gh-pages
git pull
git reset --hard origin/master
git add -f dist
git commit -m "Added dist folder"
git push --force origin gh-pages
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/data*
*.DS_Store
node_modules/*
node_modules
dist
1 change: 1 addition & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/data*
4 changes: 2 additions & 2 deletions LICENSE.TXT
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Copyright (c) 2011 Genome Research Ltd.
Author: Evgeny Bragin
Author: Simon Brent, Evgeny Bragin

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
Expand All @@ -21,4 +21,4 @@ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Loading

0 comments on commit 0cfe6ce

Please sign in to comment.