Mirror of https://github.com/roostorg/coop github.com/roostorg/coop
2
fork

Configure Feed

Select the types of activity you want to include in your feed.

client: Add dummy package.json for ESLint custom rules (#281)

* client: Add dummy package.json for ESLint custom rules

NPM requires "package.json" file to include "name" and "version" fields
for packages published to the registry [0]. ESLint custom rules will
stay within this repo for the time being. Dependabot doesn't impose any
requirements on this file so an empty one would suffice but let's provide
some details anyway.

File "index.js" now filters out all non-JS files so there's no attempt
made to pick up additional rules from the dummy "package.json".

[0] https://docs.npmjs.com/creating-a-package-json-file

Fixes: #279

Co-authored-by: Juan Mrad <juansmrad@gmail.com>

authored by

Paweł Wieczorek
Juan Mrad
and committed by
GitHub
d9257a07 86090688

+8 -1
+1 -1
client/eslint/index.js
··· 5 5 .readdirSync(__dirname) 6 6 .filter((file) => { 7 7 const fullPath = path.join(__dirname, file); 8 - return !fs.statSync(fullPath).isDirectory() && file !== "index.js" && !file.endsWith("test.js"); 8 + return !fs.statSync(fullPath).isDirectory() && file.endsWith(".js") && file !== "index.js" && !file.endsWith("test.js"); 9 9 }); 10 10 11 11 const rules = Object.fromEntries(
+7
client/eslint/package.json
··· 1 + { 2 + "name": "eslint-plugin-custom-rules", 3 + "version": "0.0.0", 4 + "private": true, 5 + "main": "index.js", 6 + "description": "Local ESLint rules. Stub package.json exists so Dependabot can resolve the file: dependency in client/package.json (see dependabot/dependabot-core#5100)." 7 + }