Skip to content

Commit

Permalink
Merge branch 'jxn-30-main'
Browse files Browse the repository at this point in the history
  • Loading branch information
YorikHansen committed Apr 14, 2024
2 parents a5e53ea + d1d86fb commit c7feb87
Show file tree
Hide file tree
Showing 8 changed files with 573 additions and 310 deletions.
2 changes: 0 additions & 2 deletions .eslintignore

This file was deleted.

119 changes: 0 additions & 119 deletions .eslintrc.json

This file was deleted.

2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "1.25.2"
".": "1.26.0"
}
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Changelog

## [1.26.0](https://github.com/YorikHansen/better-moodle/compare/1.25.2...1.26.0) (2024-04-14)


### Features

* implement darkmode ([#136](https://github.com/YorikHansen/better-moodle/issues/136)) ([9b3fd41](https://github.com/YorikHansen/better-moodle/commit/9b3fd41d6d1dd5372aca218e9fcdbd749241e962))

## [1.25.2](https://github.com/YorikHansen/better-moodle/compare/1.25.1...1.25.2) (2024-04-10)


Expand Down
147 changes: 147 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,147 @@
import globals from 'globals';
import js from '@eslint/js';
import prettier from 'eslint-config-prettier';
import userscripts from 'eslint-plugin-userscripts';

/** @type {FlatConfig[]} */
export default [
js.configs.recommended,
prettier,
{
name: 'better-moodle general ESLint config',
files: ['**/*.js'],
ignores: ['node_modules/*', '.yarn/*'],
languageOptions: {
ecmaVersion: 'latest',
sourceType: 'script',
globals: {
...globals.browser,
...globals.es2021,
},
parserOptions: {
ecmaFeatures: {
globalReturn: true,
},
},
},
rules: {
'array-callback-return': ['error'],
'block-scoped-var': 'warn',
'curly': ['warn', 'multi-line'],
'dot-notation': ['warn', { allowKeywords: true }],
'default-case-last': 'error',
'guard-for-in': 'error',
'no-caller': 'warn',
'no-constant-binary-expression': 'error',
'no-duplicate-imports': ['error', { includeExports: true }],
'no-eval': 'error',
'no-extra-bind': 'warn',
'no-implicit-coercion': [
'error',
{
allow: ['!!'],
},
],
'no-implicit-globals': 'error',
'no-implied-eval': 'warn',
'no-lone-blocks': 'warn',
'no-loop-func': 'error',
'no-multi-str': 'warn',
'no-octal-escape': 'error',
'no-param-reassign': 'error',
'no-proto': 'warn',
'no-return-assign': 'warn',
'no-self-compare': 'error',
'no-sequences': 'error',
'no-template-curly-in-string': 'warn',
'no-undef': 'warn',
'no-unmodified-loop-condition': 'error',
'no-unreachable-loop': 'error',
'no-unused-expressions': 'error',
'no-useless-call': 'warn',
'no-useless-concat': 'warn',
'no-useless-rename': 'error',
'no-useless-return': 'warn',
'no-var': 'error',
'no-with': 'warn',
'object-shorthand': ['error', 'always', { avoidQuotes: true }],
'prefer-arrow-callback': 'error',
'prefer-const': 'error',
'prefer-regex-literals': [
'error',
{
disallowRedundantWrapping: true,
},
],
'prefer-rest-params': 'error',
'prefer-spread': 'error',
'prefer-template': 'error',
'sort-imports': [
'warn',
{
allowSeparatedGroups: true,
ignoreCase: true,
memberSyntaxSortOrder: [
'none',
'all',
'single',
'multiple',
],
},
],
'yoda': [
'error',
'never',
{
exceptRange: true,
},
],
},
},
{
name: 'set sourceType to module for eslint.config.js',
files: ['eslint.config.js'],
languageOptions: {
sourceType: 'module',
},
},
{
name: 'userscript extended config',
...userscripts.configs.recommended,
files: ['*.user.js'],
plugins: {
userscripts,
},
languageOptions: {
globals: {
uneval: 'readonly',
unsafeWindow: 'readonly',
GM_info: 'readonly',
GM: 'readonly',
GM_addStyle: 'readonly',
GM_addElement: 'readonly',
GM_cookie: 'readonly',
GM_deleteValue: 'readonly',
GM_listValues: 'readonly',
GM_getValue: 'readonly',
GM_download: 'readonly',
GM_log: 'readonly',
GM_registerMenuCommand: 'readonly',
GM_unregisterMenuCommand: 'readonly',
GM_openInTab: 'readonly',
GM_setValue: 'readonly',
GM_addValueChangeListener: 'readonly',
GM_removeValueChangeListener: 'readonly',
GM_xmlhttpRequest: 'readonly',
GM_webRequest: 'readonly',
GM_getTab: 'readonly',
GM_saveTab: 'readonly',
GM_getTabs: 'readonly',
GM_setClipboard: 'readonly',
GM_notification: 'readonly',
GM_getResourceText: 'readonly',
GM_getResourceURL: 'readonly',
},
},
},
];
10 changes: 7 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,23 @@
{
"name": "uzl-better-moodle",
"description": "Improves the new weird Moodle 4 UI on UzL-Moodle",
"version": "1.25.2",
"version": "1.26.0",
"packageManager": "[email protected]",
"type": "module",
"private": true,
"scripts": {
"lint:fix": "yarn eslint . --ext .js,.user.js,.mjs --exit-on-fatal-error --report-unused-disable-directives --cache --cache-strategy content --fix",
"lint:fix": "yarn eslint . --exit-on-fatal-error --report-unused-disable-directives --cache --cache-strategy content --fix",
"prettier:write": "prettier --write --cache --cache-strategy content ."
},
"devDependencies": {
"@eslint/js": "9.0.0",
"@types/eslint": "8.56.8",
"@types/tampermonkey": "5.0.2",
"eslint": "8.57.0",
"darkreader": "4.9.83",
"eslint": "9.0.0",
"eslint-config-prettier": "9.1.0",
"eslint-plugin-userscripts": "0.5.2",
"globals": "15.0.0",
"prettier": "3.2.5",
"userscript-meta": "1.0.1"
}
Expand Down
Loading

0 comments on commit c7feb87

Please sign in to comment.