mirror of
https://github.com/edward-shen/MMM-pages.git
synced 2025-03-12 16:58:19 -07:00
Compare commits
2 commits
361f55bec1
...
90a7651f40
Author | SHA1 | Date | |
---|---|---|---|
|
90a7651f40 | ||
|
6db5efe2c8 |
2 changed files with 18 additions and 30 deletions
|
@ -26,7 +26,6 @@ Module.register('MMM-pages', {
|
||||||
return ['pages.css'];
|
return ['pages.css'];
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Modulo that also works with negative numbers.
|
* Modulo that also works with negative numbers.
|
||||||
*
|
*
|
||||||
|
@ -34,7 +33,7 @@ Module.register('MMM-pages', {
|
||||||
* @param {number} n The divisor
|
* @param {number} n The divisor
|
||||||
*/
|
*/
|
||||||
mod(x, n) {
|
mod(x, n) {
|
||||||
return (x % n + n) % n;
|
return ((x % n) + n) % n;
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -213,13 +212,13 @@ Module.register('MMM-pages', {
|
||||||
|
|
||||||
MM.getModules()
|
MM.getModules()
|
||||||
.exceptWithClass(modulesToShow)
|
.exceptWithClass(modulesToShow)
|
||||||
.enumerate((module) => module.hide(animationTime, lockStringObj));
|
.enumerate(module => module.hide(animationTime, lockStringObj));
|
||||||
|
|
||||||
// Shows all modules meant to be on the current page, after a small delay.
|
// Shows all modules meant to be on the current page, after a small delay.
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
MM.getModules()
|
MM.getModules()
|
||||||
.withClass(modulesToShow)
|
.withClass(modulesToShow)
|
||||||
.enumerate((module) => module.show(animationTime, lockStringObj));
|
.enumerate(module => module.show(animationTime, lockStringObj));
|
||||||
}, animationTime);
|
}, animationTime);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -3,6 +3,8 @@ import eslintPluginStylistic from '@stylistic/eslint-plugin';
|
||||||
import globals from 'globals';
|
import globals from 'globals';
|
||||||
|
|
||||||
const config = [
|
const config = [
|
||||||
|
eslintPluginJs.configs.recommended,
|
||||||
|
eslintPluginStylistic.configs['recommended-flat'],
|
||||||
{
|
{
|
||||||
files: ['**/*.js', '**/*.mjs'],
|
files: ['**/*.js', '**/*.mjs'],
|
||||||
},
|
},
|
||||||
|
@ -16,23 +18,10 @@ const config = [
|
||||||
Module: 'readonly',
|
Module: 'readonly',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
plugins: {
|
|
||||||
...eslintPluginStylistic.configs['all-flat'].plugins,
|
|
||||||
},
|
|
||||||
rules: {
|
rules: {
|
||||||
...eslintPluginJs.configs.recommended.rules,
|
|
||||||
...eslintPluginStylistic.configs['all-flat'].rules,
|
|
||||||
'@stylistic/array-element-newline': 'off',
|
|
||||||
'@stylistic/brace-style': ['error', '1tbs', { allowSingleLine: true }],
|
'@stylistic/brace-style': ['error', '1tbs', { allowSingleLine: true }],
|
||||||
'@stylistic/comma-dangle': ['error', 'only-multiline'],
|
'@stylistic/comma-dangle': ['error', 'only-multiline'],
|
||||||
'@stylistic/dot-location': ['error', 'property'],
|
'@stylistic/semi': ['error', 'always'],
|
||||||
'@stylistic/function-call-argument-newline': 'off',
|
|
||||||
'@stylistic/indent': ['error', 2],
|
|
||||||
'@stylistic/padded-blocks': 'off',
|
|
||||||
'@stylistic/quote-props': ['error', 'consistent-as-needed'],
|
|
||||||
'@stylistic/quotes': ['error', 'single'],
|
|
||||||
'@stylistic/multiline-comment-style': 'off',
|
|
||||||
'@stylistic/multiline-ternary': 'off',
|
|
||||||
'object-shorthand': ['error', 'always']
|
'object-shorthand': ['error', 'always']
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue