Skip to content

Commit

Permalink
1.8
Browse files Browse the repository at this point in the history
  • Loading branch information
jfactory-es committed Oct 27, 2024
1 parent cf4cc19 commit 17120c7
Show file tree
Hide file tree
Showing 5 changed files with 939 additions and 55 deletions.
8 changes: 4 additions & 4 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
root = true

[*.{js,mjs}]
[*.{js,cjs,mjs}]
charset = utf-8
end_of_line = lf
indent_style = space
Expand All @@ -11,9 +11,9 @@ insert_final_newline = false
indent_size = 2
tab_width = 2

[test/*.js]
indent_size = 4
tab_width = 4
[*.cjs]
indent_size = 2
tab_width = 2

[*.mjs]
indent_size = 4
Expand Down
90 changes: 42 additions & 48 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,68 +1,64 @@
module.exports = {

extends: [
"eslint:recommended"
'eslint:recommended'
],
ignorePatterns: [
"/*",
"**/_*",
"**/*fork",
"!scripts/",
"!src/",
"!test/**",
"!.eslintrc.js"
'/*',
'**/_*',
'!scripts/',
'!src/',
'!test/',
'!.eslintrc.js'
],
env: {
es6: true
},
parserOptions: {
ecmaVersion: 2020,
sourceType: "module"
sourceType: 'module'
},
rules: {
"max-len": ["error", 120],
"eol-last": ["error", "never"],
quotes: ["error", "double", { avoidEscape: true }],
"arrow-parens": ["error", "as-needed"],
"quote-props": ["error", "as-needed"],
"comma-dangle": ["error", "never"],
"no-empty": ["error", { allowEmptyCatch: true }],
"space-unary-ops": ["error", { words: false }],
"space-infix-ops": "error",
"object-curly-spacing": ["error", "always", {
'max-len': ['error', 120],
'eol-last': ['error', 'never'],
quotes: ['error', 'double', { avoidEscape: true }],
'arrow-parens': ['error', 'as-needed'],
'quote-props': ['error', 'as-needed'],
'comma-dangle': ['error', 'never'],
'no-empty': ['error', { allowEmptyCatch: true }],
'space-unary-ops': ['error', { words: false }],
'space-infix-ops': 'error',
'object-curly-spacing': ['error', 'always', {
// arraysInObjects: false
}],
"no-extra-parens": ["error", "all", {
'no-extra-parens': ['error', 'all', {
conditionalAssign: false
}],
"comma-spacing": ["error", { before: false, after: true }],
"arrow-spacing": "error",
"func-call-spacing": "error",
"key-spacing": ["error", { afterColon: true }],
"keyword-spacing": ["error", { before: true }],
"space-before-function-paren": ["error", {
anonymous: "never",
named: "never",
asyncArrow: "always"
'comma-spacing': ['error', { before: false, after: true }],
'arrow-spacing': 'error',
'func-call-spacing': 'error',
'key-spacing': ['error', { afterColon: true }],
'keyword-spacing': ['error', { before: true }],
'space-before-function-paren': ['error', {
anonymous: 'never',
named: 'never',
asyncArrow: 'always'
}]
},

overrides: [

{
files: ["*.js"],
files: ['*.js', '*.cjs'],
env: { node: true },
rules: {
indent: [
2, 2, {
SwitchCase: 1
}],
"no-prototype-builtins": "off"
'no-prototype-builtins': 'off',
quotes: ['error', 'single', { avoidEscape: true }]
}
},

{
files: ["src/*.mjs"],
files: ['src/*.mjs'],
env: {
browser: true
},
Expand All @@ -73,29 +69,27 @@ module.exports = {
}]
},
globals: {
globalThis: "readonly", // not yet supported
process: "readonly", // only process is required
COMPILER_DEV: "readonly",
COMPILER_DEBUG: "readonly",
COMPILER_CLI: "readonly",
jFactoryOverride: "readonly",
StackTrace: "readonly"
globalThis: 'readonly', // not yet supported
process: 'readonly', // only process is required
COMPILER_DEV: 'readonly',
COMPILER_DEBUG: 'readonly',
COMPILER_CLI: 'readonly',
jFactoryOverride: 'readonly',
StackTrace: 'readonly'
}
},

{
files: ["test/*.test.js"],
files: ['test/**/*.test.js'],
env: {
browser: true,
mocha: true
},
rules: {
indent: [
2, 4
2, 2
],
"require-atomic-updates": "off"
'require-atomic-updates': 'off'
}
}

]
};
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,5 @@ lerna-debug.log*
_*
.env
*.local
node_modules
node_modules
/test/export-compiled/
Loading

0 comments on commit 17120c7

Please sign in to comment.