From 6a45f88864af246960887c9ce492e31b84415a45 Mon Sep 17 00:00:00 2001 From: Bauke Date: Sat, 20 Apr 2019 01:36:11 +0200 Subject: [PATCH] Create package.json and ESLint+Stylelint configs --- .gitignore | 3 +++ tildes/package.json | 62 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 65 insertions(+) create mode 100644 tildes/package.json diff --git a/.gitignore b/.gitignore index 877913c..8db359b 100644 --- a/.gitignore +++ b/.gitignore @@ -21,3 +21,6 @@ tildes/static/js/tildes.js # don't track site icon files tildes/static/images/site-icons/*.png + +# NodeJS dependencies +tildes/node_modules/ diff --git a/tildes/package.json b/tildes/package.json new file mode 100644 index 0000000..528da38 --- /dev/null +++ b/tildes/package.json @@ -0,0 +1,62 @@ +{ + "name": "tildes", + "version": "1.0.0", + "description": "Tildes (tildes.net) - a non-profit community site", + "license": "AGPL-3.0-or-later", + "scripts": { + "lint": "npm run lint:js ; npm run lint:scss", + "lint:js": "eslint static/js/", + "lint:scss": "stylelint scss/" + }, + "dependencies": {}, + "devDependencies": { + "eslint": "^5.16.0", + "stylelint": "^10.0.1", + "stylelint-scss": "^3.6.0" + }, + "eslintConfig": { + "env": { + "browser": true + }, + "extends": "eslint:recommended", + "globals": { + "$": "readonly", + "Intercooler": "readonly", + "Tildes": "readonly" + }, + "rules": { + "indent": [ + "error", + 4 + ], + "linebreak-style": [ + "error", + "unix" + ], + "quotes": [ + "error", + "single" + ], + "semi": [ + "error", + "always" + ] + } + }, + "eslintIgnore": [ + "static/js/third_party*" + ], + "stylelint": { + "ignoreFiles": [ + "scss/spectre*/**" + ], + "plugins": [ + "stylelint-scss" + ], + "rules": { + "indentation": 2, + "no-descending-specificity": null, + "string-quotes": "double" + } + } +}