Skip to content

Commit

Permalink
Merge branch 'master' into build
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Jun 17, 2021
2 parents d24a254 + 47318f4 commit d3b3440
Show file tree
Hide file tree
Showing 109 changed files with 8,999 additions and 14,924 deletions.
6 changes: 3 additions & 3 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
.eslintrc.js
.eslintrc.*.js
configschema.d.ts
webpack.config.js
vetur.config.js
dashboard/**/*
extension/**/*
node_modules/**/*
script/**/*
schemas/**/*
schemas/**/*
src/types/schemas/**/*
77 changes: 46 additions & 31 deletions .eslintrc.browser.js
Original file line number Diff line number Diff line change
@@ -1,65 +1,80 @@
/**
* Some stuff is commented out that may need re-enabling if necessary.
*/

const path = require('path');

module.exports = {
root: true,
env: {
node: true,
// es6: true,
},
parser: 'vue-eslint-parser',
parserOptions: {
parser: '@typescript-eslint/parser',
project: 'tsconfig.browser.json',
sourceType: 'module',
extraFileExtensions: ['.vue'],
},
env: {
es6: true,
node: true,
ecmaVersion: 2020,
// sourceType: 'module',
},
globals: {
nodecg: 'readonly',
NodeCG: 'readonly',
},
plugins: [
'vue',
'@typescript-eslint',
// 'vue',
],
extends: [
'airbnb-base',
'plugin:vue/recommended',
'plugin:vue/essential',
// 'airbnb-base',
'airbnb-typescript/base',
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:import/typescript',
],
settings: {
'import/core-modules': ['nodecg/types/browser'],
'import/extensions': ['.js', '.jsx', '.ts', '.tsx'],
'import/resolver': {
node: {
moduleDirectory: [
'node_modules',
'../..',
'.',
],
typescript: {
// This is needed to properly resolve paths.
project: 'tsconfig.browser.json',
},
/*
fibers in webpack has the issue "no binary", making this display
an annoying error in VSCode, so leaving off for now.
*/
/* webpack: {
config: path.join(__dirname, 'webpack.config.js'),
}, */
},
'import/extensions': ['.js', '.jsx', '.ts', '.tsx'],
},
rules: {
// Everything is compiled for the browser so dev dependencies are fine.
'import/no-extraneous-dependencies': ['error', { devDependencies: true }],
// max-len set to ignore "import" lines (as they usually get long and messy).
// Also includes pattern for i18n JSON.
'max-len': ['error', { code: 100, ignorePattern: '^import\\s.+\\sfrom\\s.+;$|"(.*?)": "(.*?)"' }],
// I mainly have this off as it ruins auto import sorting in VSCode.
'object-curly-newline': 'off',
'@typescript-eslint/lines-between-class-members': 'off',
'vue/html-self-closing': ['error'],
'class-methods-use-this': 'off',
'no-param-reassign': ['error', {
props: true,
ignorePropertyModificationsFor: [
'state', // for vuex state
'acc', // for reduce accumulators
'e', // for e.returnvalue
],
}],
'import/extensions': ['error', 'ignorePackages', {
js: 'never',
jsx: 'never',
ts: 'never',
tsx: 'never',
}],
'import/no-extraneous-dependencies': ['error', {
devDependencies: true, // Some places have dev deps imported where eslint complains.
packageDir: ['.', '../..'], // Check for deps in NodeCG folder as well.
}],
'import/no-unresolved': [2, { caseSensitive: false }],
'max-len': [
'error',
{
'code': 100,
ignorePattern: '"(.*?)": "(.*?)"' // Pattern for i18n JSON
}
],
'lines-between-class-members': 'off',
'class-methods-use-this': 'off',
'object-curly-newline': 'off',
// 'import/no-unresolved': [2, { commonjs: true, caseSensitive: false }],
}
};
50 changes: 34 additions & 16 deletions .eslintrc.extension.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
/**
* Some stuff is commented out that may need re-enabling if necessary.
*/

module.exports = {
root: true,
env: {
node: true,
},
parser: '@typescript-eslint/parser',
parserOptions: {
project: 'tsconfig.extension.json',
Expand All @@ -8,40 +15,51 @@ module.exports = {
'@typescript-eslint',
],
extends: [
'airbnb-base',
'airbnb-typescript/base',
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:import/typescript',
],
settings: {
'import/core-modules': ['nodecg/types/server'],
'import/extensions': ['.js', '.jsx', '.ts', '.tsx'],
'import/resolver': {
node: {
moduleDirectory: [
'node_modules',
'../..',
'.',
],
typescript: {
// This is needed to properly resolve paths.
project: 'tsconfig.extension.json',
},
},
'import/extensions': ['.js', '.jsx', '.ts', '.tsx'],
},
rules: {
'@typescript-eslint/lines-between-class-members': 'off',
// max-len set to ignore "import" lines (as they usually get long and messy).
'max-len': ['error', { code: 100, ignorePattern: '^import\\s.+\\sfrom\\s.+;$' }],
// I mainly have this off as it ruins auto import sorting in VSCode.
'object-curly-newline': 'off',
'import/extensions': ['error', 'ignorePackages', {
js: 'never',
jsx: 'never',
ts: 'never',
tsx: 'never',
}],
'import/no-extraneous-dependencies': ['error', {
devDependencies: true, // Some places have dev deps imported where eslint complains.
packageDir: ['.', '../..'], // Check for deps in NodeCG folder as well.
}],
'import/no-unresolved': [2, { caseSensitive: false }],
'max-len': ['error', { 'code': 100 }],
'lines-between-class-members': 'off',
// 'import/no-unresolved': [2, { commonjs: true, caseSensitive: false }],

'require-atomic-updates': 'off',
'no-restricted-syntax': 'off',
'no-await-in-loop': 'off',
},

// Overrides for types.
overrides: [{
files: ['**/*.d.ts'],
rules: {
// @typescript-eslint/no-unused-vars does not work with type definitions
'@typescript-eslint/no-unused-vars': 'off',
// Sometimes eslint complains about this for types (usually when using namespaces).
'import/prefer-default-export': 'off',
// Types are only used for development (usually!) so dev dependencies are fine.
'import/no-extraneous-dependencies': ['error', { devDependencies: true }],

// 'camelcase': 'off',
}
}],
};
1 change: 1 addition & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// This is here just to make sure ESLint doesn't check NodeCG's own configuration.
module.exports = {
root: true,
}
31 changes: 0 additions & 31 deletions .eslintrc.types.js

This file was deleted.

6 changes: 3 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
token: ${{ secrets['GITHUB_TOKEN'] }}
repository: nodecg/nodecg
path: ./nodecg-temp

# Copies checked out NodeCG into permanent folder
# If I didn't do this, some bundles seemed to not actually checkout successfully later
- name: Copy ./nodecg-temp > ./nodecg
Expand Down Expand Up @@ -64,10 +64,10 @@ jobs:
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
# Update NPM to the latest version
- name: Update NPM installation
run: npm install -g npm@7.7.0
run: npm install -g npm@7.17.0

# Setup GitHub SSH key so we can npm install GitHub repositories (even needed for public ones)
- name: GitHub SSH setup
Expand Down
46 changes: 0 additions & 46 deletions configschema.d.ts

This file was deleted.

15 changes: 0 additions & 15 deletions jsconfig.json

This file was deleted.

Loading

0 comments on commit d3b3440

Please sign in to comment.