Skip to content

Commit

Permalink
Merge pull request #7 from remotemerge/update-code
Browse files Browse the repository at this point in the history
Update code
  • Loading branch information
remotemerge authored Dec 27, 2023
2 parents d599d1c + f53b80c commit 4a6c476
Show file tree
Hide file tree
Showing 10 changed files with 1,006 additions and 1,068 deletions.
8 changes: 4 additions & 4 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
root = true

# global configs
# Global options
[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
indent_style = space
indent_size = 2
trim_trailing_whitespace = true
max_line_length = 120
max_line_length = 80

# markdown
# Markdown options
[*.md]
trim_trailing_whitespace = false
insert_final_newline = false
max_line_length = 9999
max_line_length = off
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@ With a customizable configuration and easy-to-use parameters, CacheServer is the

### System Requirements

CacheServer is compatible with Node.js v14 and above, although using the latest version of Node.js is highly recommended to ensure access to all features and optimal performance.
- CacheServer is compatible with Node.js v14 and above, although using the latest version of Node.js is highly recommended to ensure access to all features and optimal performance.
- If you encounter errors, please refer to the Puppeteer troubleshooting instructions:
```text
https://pptr.dev/troubleshooting
```

**Note:** Ensure that Node.js is properly installed and accessible in system PATH.

Expand Down
47 changes: 18 additions & 29 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,40 +1,29 @@
import globals from 'globals';
import tsEslintParser from '@typescript-eslint/parser';
import tsEslintPlugin from '@typescript-eslint/eslint-plugin';
import jsdocEslintPlugin from 'eslint-plugin-jsdoc';
import tsParser from '@typescript-eslint/parser';
import tsPlugin from '@typescript-eslint/eslint-plugin';
import prettier from 'eslint-plugin-prettier';
import jsdoc from 'eslint-plugin-jsdoc';

export default [
{
ignores: ['node_modules/**', 'dist/**', '**/*.html'],
},
{
files: ['**/*.ts', '**/*.js'],
rules: {
'linebreak-style': ['error', 'unix'],
'no-console': 'warn',
'no-undef': 'error',
'no-unused-vars': 'error',
'prefer-const': 'error',
indent: ['error', 2, { SwitchCase: 1 }],
quotes: ['error', 'single'],
semi: ['error', 'always'],
},
plugins: {
jsdocEslintPlugin,
},
ignores: ['dist', 'public', 'node_modules'],
files: ['makers/*.ts', 'src/**/*.ts'],
languageOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
globals: { ...globals.browser, ...globals.node },
},
},
{
files: ['**/*.ts'],
languageOptions: {
parser: tsEslintParser,
parser: tsParser,
},
plugins: {
'@typescript-eslint': tsEslintPlugin,
'@typescript-eslint': tsPlugin,
prettier,
jsdoc,
},
rules: {
'prettier/prettier': 'error',
indent: ['error', 2, { SwitchCase: 1 }],
'linebreak-style': ['error', 'unix'],
'prefer-const': 'error',
quotes: ['error', 'single'],
semi: ['error', 'always'],
},
},
];
6 changes: 5 additions & 1 deletion makers/package.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,11 @@ const configs = {
// generate package.json in dist
const publicPath = join(resolve(), 'dist');
await mkdir(publicPath, { recursive: true });
await writeFile(join(publicPath, 'package.json'), JSON.stringify(configs), 'utf-8');
await writeFile(
join(publicPath, 'package.json'),
JSON.stringify(configs),
'utf-8',
);

// copy README.md to dist
await copyFile('README.md', `${publicPath}/README.md`);
Loading

0 comments on commit 4a6c476

Please sign in to comment.