mirror of
https://github.com/cotes2020/jekyll-theme-chirpy.git
synced 2025-10-20 17:53:45 +00:00
chore: complete ESLint v9 configuration
This commit is contained in:
parent
8bf72fc234
commit
49519d13e5
@ -1,5 +1,35 @@
|
||||
export default [
|
||||
import { defineConfig, globalIgnores } from 'eslint/config';
|
||||
import js from '@eslint/js';
|
||||
import globals from 'globals';
|
||||
|
||||
export default defineConfig([
|
||||
globalIgnores(['assets/*', 'node_modules/*', '_site/*']),
|
||||
js.configs.recommended,
|
||||
{
|
||||
files: ['_javascript/**/*.js']
|
||||
rules: {
|
||||
semi: ['error', 'always'],
|
||||
quotes: ['error', 'single']
|
||||
},
|
||||
languageOptions: {
|
||||
globals: {
|
||||
...globals.browser,
|
||||
...globals.node
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
files: ['_javascript/**/*.js'],
|
||||
languageOptions: {
|
||||
globals: {
|
||||
ClipboardJS: 'readonly',
|
||||
GLightbox: 'readonly',
|
||||
Theme: 'readonly',
|
||||
dayjs: 'readonly',
|
||||
mermaid: 'readonly',
|
||||
tocbot: 'readonly',
|
||||
importScripts: 'readonly',
|
||||
swconf: 'readonly'
|
||||
}
|
||||
}
|
||||
}
|
||||
];
|
||||
]);
|
||||
|
@ -13,14 +13,16 @@
|
||||
"url": "https://github.com/cotes2020/jekyll-theme-chirpy/issues"
|
||||
},
|
||||
"homepage": "https://github.com/cotes2020/jekyll-theme-chirpy/",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"build": "concurrently npm:build:*",
|
||||
"build:css": "node purgecss.js",
|
||||
"build:js": "rollup -c --bundleConfigAsCjs --environment BUILD:production",
|
||||
"watch:js": "rollup -c --bundleConfigAsCjs -w",
|
||||
"lint:js": "eslint",
|
||||
"lint:scss": "stylelint _sass/**/*.scss",
|
||||
"lint:fix:scss": "npm run lint:scss -- --fix",
|
||||
"test": "npm run lint:scss",
|
||||
"test": "npm run lint:js && npm run lint:scss",
|
||||
"prepare": "husky"
|
||||
},
|
||||
"dependencies": {
|
||||
@ -42,6 +44,8 @@
|
||||
"@semantic-release/git": "^10.0.1",
|
||||
"concurrently": "^9.1.2",
|
||||
"conventional-changelog-conventionalcommits": "^8.0.0",
|
||||
"eslint": "^9.27.0",
|
||||
"globals": "^16.1.0",
|
||||
"husky": "^9.1.7",
|
||||
"purgecss": "^7.0.2",
|
||||
"rollup": "^4.41.0",
|
||||
|
@ -1,5 +1,6 @@
|
||||
const fs = require('fs').promises;
|
||||
const { PurgeCSS } = require('purgecss');
|
||||
import { promises as fs } from 'fs';
|
||||
import { PurgeCSS } from 'purgecss';
|
||||
|
||||
const DIST_PATH = '_sass/vendors';
|
||||
const output = `${DIST_PATH}/_bootstrap.scss`;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user