mirror of
https://github.com/Fechin/reference.git
synced 2026-12-06 11:12:57 +03:00
- Add comprehensive development tooling: * ESLint configuration with modern JavaScript rules * Prettier for consistent code formatting * Husky for Git hooks automation * lint-staged for pre-commit checks * Conventional Commits with commitlint * Stylelint for CSS code quality - Fix CSS issues: * Resolve duplicate selectors in layout_note.css * Merge duplicate selectors in layout_list.css * Ensure stylelint compliance - Apply consistent code formatting: * Format all JavaScript, CSS, and Markdown files * Standardize code style across the project * Fix console statement warnings in main.js - Update project documentation: * Enhance README with modern development practices * Update package.json with new scripts and dependencies This modernization establishes a robust development environment with automated code quality checks, consistent formatting~
53 lines
1.1 KiB
JavaScript
53 lines
1.1 KiB
JavaScript
module.exports = {
|
|
env: {
|
|
browser: true,
|
|
es2022: true,
|
|
node: true
|
|
},
|
|
extends: ['eslint:recommended', 'prettier'],
|
|
parserOptions: {
|
|
ecmaVersion: 'latest',
|
|
sourceType: 'module'
|
|
},
|
|
rules: {
|
|
// Error level rules
|
|
'no-console': 'warn',
|
|
'no-debugger': 'error',
|
|
'no-unused-vars': [
|
|
'error',
|
|
{
|
|
argsIgnorePattern: '^_',
|
|
varsIgnorePattern: '^_'
|
|
}
|
|
],
|
|
|
|
// ES6+ best practices
|
|
'prefer-const': 'error',
|
|
'no-var': 'error',
|
|
'object-shorthand': 'error',
|
|
'prefer-template': 'error',
|
|
'prefer-arrow-callback': 'error',
|
|
|
|
// Best practices
|
|
eqeqeq: ['error', 'always'],
|
|
curly: ['error', 'all'],
|
|
'no-eval': 'error',
|
|
'no-implied-eval': 'error',
|
|
'no-new-func': 'error',
|
|
'no-script-url': 'error',
|
|
|
|
// Function related
|
|
'func-style': ['error', 'declaration', { allowArrowFunctions: true }],
|
|
'no-loop-func': 'error',
|
|
|
|
// Objects and arrays
|
|
'dot-notation': 'error'
|
|
},
|
|
|
|
globals: {
|
|
hexo: 'readonly',
|
|
Utils: 'readonly',
|
|
Fuse: 'readonly'
|
|
}
|
|
};
|