[ALOY-1522] Silence Alloy warnings about non-model files for file names that begin with a period
GitHub Issue | n/a |
Type | Improvement |
Priority | n/a |
Status | Open |
Resolution | Unresolved |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | n/a |
Labels | n/a |
Reporter | Daniel Pfeiffer |
Assignee | Feon Sua Xin Miao |
Created | 2016-07-27T15:16:53.000+0000 |
Updated | 2016-10-13T15:59:23.000+0000 |
Description
During our build process, we're getting a warning from Alloy:
{noformat}
Non-model file ".eslintrc.json" in models directory
{noformat}
We are using eslint in our project and need to specify some special settings for the model files. I see in the Alloy source code (commands/compile/index.js:934) that this warning is displayed for each file that doesn't match the RegEx (basically any file that doesn't end in "js").
I could avoid the warning by making it an .eslint.js file, but that would mean it would get copied to the final product (which I'd like to avoid). It seems like it would be a nice addition if files that start with a period are skipped and don't produce warnings.
Attachments
Hello, Can you provide a sample test case that reproduce the issue? we will look into it. Thanks.
I'm attaching a sample project. This is a new Alloy project with a single
.eslintrc.json
file in themodels
directory. (.eslintrc.json
is a configuration file for ESLint (http://eslint.org). When you build this project:You will receive the following warning:
Ideally, the Alloy compiler would ignore files that begin with a period since they would not be model files and are likely configuration files for SVN, ESLint, or other tools.
Hello, Looking into your zip file. I don't see any .eslintrc.json in the models folder inside app folder. The file looks to be a hidden file. Can you attach the file here. Thanks.
Here is the file--I've renamed it for the purposes of attaching it here, but in the provided zip file, this file was located here: app/models/.eslintrc.json